summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2008-11-21 06:48:00 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2008-11-21 06:48:00 +0100
commit1809269f1df368aab3f7f1bb615c2cdc52860a1f (patch)
treead7873dda7292178e159f4967af4411920c3a473
parent35e5070403ddae96238bcce6356f4b9713c96675 (diff)
downloaddbscripts-1809269f1df368aab3f7f1bb615c2cdc52860a1f.tar.gz
dbscripts-1809269f1df368aab3f7f1bb615c2cdc52860a1f.tar.xz
Move everything to /srv to support new server conf
Additionally, make TMPDIR configurable so we can move that Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rw-r--r--config5
-rw-r--r--db-functions4
-rwxr-xr-xdb-move2
-rwxr-xr-xdb-remove2
-rwxr-xr-xdb-update2
-rwxr-xr-xtesting2x2
6 files changed, 9 insertions, 8 deletions
diff --git a/config b/config
index dbed5bd..5fe1969 100644
--- a/config
+++ b/config
@@ -1,4 +1,5 @@
-FTP_BASE="/home/ftp/"
-SVN_PATH="file:///home/svn-packages"
+FTP_BASE="/srv/ftp/"
+SVN_PATH="file:///srv/svn/packages"
STAGING="$HOME/staging/"
+TMPDIR="/srv/tmp"
diff --git a/db-functions b/db-functions
index 9724e1c..4252c59 100644
--- a/db-functions
+++ b/db-functions
@@ -20,7 +20,7 @@ source_makepkg () {
}
repo_lock () { #repo_lock repo-name arch
- LOCKFILE="/tmp/.repolck.$1.$2"
+ LOCKFILE="$TMPDIR/.repolock.$1.$2"
if [ -f "$LOCKFILE" ]; then
owner="$(/usr/bin/stat -c %U $LOCKFILE)"
echo "error: db generation is already in progress (started by $owner)"
@@ -31,7 +31,7 @@ repo_lock () { #repo_lock repo-name arch
}
repo_unlock () { #repo_unlock repo-name arch
- LOCKFILE="/tmp/.repolck.$1.$2"
+ LOCKFILE="$TMPDIR/.repolock.$1.$2"
if [ ! -f "$LOCKFILE" ]; then
echo "error: repo lock doesn't exist... something went terribly wrong!"
else
diff --git a/db-move b/db-move
index 5be1813..789e536 100755
--- a/db-move
+++ b/db-move
@@ -24,7 +24,7 @@ svnrepo_to="$repoto-$arch"
[ "$UID" = "" ] && UID=$(uid)
-WORKDIR="/home/tmp/db-move.$svnrepo_from.$svnrepo_to.$UID"
+WORKDIR="$TMPDIR/db-move.$svnrepo_from.$svnrepo_to.$UID"
cleanup() {
# unlock
diff --git a/db-remove b/db-remove
index bdbd254..47268ed 100755
--- a/db-remove
+++ b/db-remove
@@ -20,7 +20,7 @@ svnrepo="$reponame-$arch"
[ "$UID" = "" ] && UID=$(uid)
-WORKDIR="/home/tmp/db-remove.$svnrepo.$UID"
+WORKDIR="$TMPDIR/db-remove.$svnrepo.$UID"
cleanup() {
# unlock
diff --git a/db-update b/db-update
index 84764eb..315c107 100755
--- a/db-update
+++ b/db-update
@@ -20,7 +20,7 @@ stagedir="$STAGING/$reponame"
[ "$UID" = "" ] && UID=$(uid)
-WORKDIR="/home/tmp/db-update.$svnrepo.$UID"
+WORKDIR="$TMPDIR/db-update.$svnrepo.$UID"
ADDPKGS=""
REMPKGS=""
diff --git a/testing2x b/testing2x
index d87de11..812edd3 100755
--- a/testing2x
+++ b/testing2x
@@ -12,7 +12,7 @@ case "$0" in
arch="i686"
;;
esac
-WORKDIR="/home/tmp/testing2x.$UID"
+WORKDIR="$TMPDIR/testing2x.$UID"
cleanup() {
rm -rf "${WORKDIR}"