summaryrefslogtreecommitdiff
path: root/cron-jobs
diff options
context:
space:
mode:
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/ftpdir-cleanup4
-rwxr-xr-xcron-jobs/integrity-check4
-rwxr-xr-xcron-jobs/repo-sanity-check4
-rwxr-xr-xcron-jobs/sourceballs2
-rwxr-xr-xcron-jobs/sourceballs22
-rwxr-xr-xcron-jobs/update-abs-tarballs2
-rwxr-xr-xcron-jobs/update-web-db6
7 files changed, 12 insertions, 12 deletions
diff --git a/cron-jobs/ftpdir-cleanup b/cron-jobs/ftpdir-cleanup
index 83e6e17..8d691b5 100755
--- a/cron-jobs/ftpdir-cleanup
+++ b/cron-jobs/ftpdir-cleanup
@@ -1,7 +1,7 @@
#!/bin/bash
-. "$(dirname $0)/../db-functions"
-. "$(dirname $0)/../config"
+. "$(dirname "$(readlink -e "$0")")/../db-functions"
+. "$(dirname "$(readlink -e "$0")")/../config"
clean_pkg() {
local pkg
diff --git a/cron-jobs/integrity-check b/cron-jobs/integrity-check
index d4f9694..05a56a5 100755
--- a/cron-jobs/integrity-check
+++ b/cron-jobs/integrity-check
@@ -1,6 +1,6 @@
#!/bin/bash
-dirname="$(dirname $0)"
+dirname="$(dirname "$(readlink -e "$0")")"
. "${dirname}/../db-functions"
. "${dirname}/../config"
@@ -8,7 +8,7 @@ dirname="$(dirname $0)"
script_lock
if [ $# -ne 1 ]; then
- die "usage: $(basename $0) <mailto>"
+ die "usage: ${0##*/} <mailto>"
fi
mailto=$1
diff --git a/cron-jobs/repo-sanity-check b/cron-jobs/repo-sanity-check
index 1ba90a6..2aa7892 100755
--- a/cron-jobs/repo-sanity-check
+++ b/cron-jobs/repo-sanity-check
@@ -1,8 +1,8 @@
#!/bin/bash
# Solves issue165
-. "$(dirname $0)/../db-functions"
-. "$(dirname $0)/../config"
+. "$(dirname "$(readlink -e "$0")")/../db-functions"
+. "$(dirname "$(readlink -e "$0")")/../config"
# Traverse all repos
for _repo in ${PKGREPOS[@]}; do
diff --git a/cron-jobs/sourceballs b/cron-jobs/sourceballs
index ee074bd..73d8432 100755
--- a/cron-jobs/sourceballs
+++ b/cron-jobs/sourceballs
@@ -1,6 +1,6 @@
#!/bin/bash
-dirname="$(dirname $(readlink -e $0))"
+dirname="$(dirname "$(readlink -e "$0")")"
. "${dirname}/../db-functions"
. "${dirname}/../config"
pushd "${WORKDIR}" >/dev/null
diff --git a/cron-jobs/sourceballs2 b/cron-jobs/sourceballs2
index 5644268..eb46579 100755
--- a/cron-jobs/sourceballs2
+++ b/cron-jobs/sourceballs2
@@ -4,7 +4,7 @@
# Makepkg --allsource every package
# Remove the old sourceballs
-dirname="$(dirname $(readlink -e $0))"
+dirname="$(dirname "$(readlink -e "$0")")"
. "${dirname}/../db-functions"
. "${dirname}/../config"
. "${MAKEPKGCONF}"
diff --git a/cron-jobs/update-abs-tarballs b/cron-jobs/update-abs-tarballs
index 824ac34..901cc4b 100755
--- a/cron-jobs/update-abs-tarballs
+++ b/cron-jobs/update-abs-tarballs
@@ -1,6 +1,6 @@
#!/bin/bash
-. "$(dirname $0)/../config"
+. "$(dirname "$(readlink -e "$0")")/../config"
rsync -av --exclude=staging/ parabolagnulinux.org::abstar/ ${FTP_BASE}/
diff --git a/cron-jobs/update-web-db b/cron-jobs/update-web-db
index 6ced4c1..825eea6 100755
--- a/cron-jobs/update-web-db
+++ b/cron-jobs/update-web-db
@@ -1,7 +1,7 @@
#!/bin/bash
-. "$(dirname $0)/../db-functions"
-. "$(dirname $0)/../config"
+. "$(dirname "$(readlink -e "$0")")/../db-functions"
+. "$(dirname "$(readlink -e "$0")")/../config"
# setup paths
SPATH="/srv/http/archweb"
@@ -14,7 +14,7 @@ REPOS=('community-testing' 'multilib-testing' 'multilib' 'community' 'extra' 'te
LOGOUT="/tmp/archweb_update.log"
# figure out what operation to perform
-cmd="$(basename $0)"
+cmd="${0##*/}"
if [[ $cmd != "update-web-db" && $cmd != "update-web-files-db" ]]; then
die "Invalid command name '$cmd' specified!"
fi