summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/load.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/bin/load.sh b/bin/load.sh
index 6dc7deb..82e8420 100755
--- a/bin/load.sh
+++ b/bin/load.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
URL="http://pluto.fsinf.at/~astra/config/"
FILE="skel.tar.gz"
@@ -6,29 +6,29 @@ FILE="skel.tar.gz"
cd ${HOME}
# fetch file from server
-TMP=`mktemp -u --suffix=".tar.gz" "config-updater-XXXXXX"`
-curl -L -s "${URL}${FILE}" -o $TMP
+TMP=`mktemp -u "config-updater-XXXXXX"`
+curl -L -s "${URL}${FILE}" -o $TMP.tar.gz
# check if file exists and is not empty
-if [ -e $TMP ]; then
- if [ -s $TMP ]; then
+if [ -e $TMP.tar.gz ]; then
+ if [ -s $TMP.tar.gz ]; then
# run pre-update commands if file exists
if [ -r ${HOME}/var/system/config-updater/pre-update ]; then
. ${HOME}/var/system/config-updater/pre-update
fi
# unpack new structure
- tar -xzf $TMP --strip-components=1
+ tar -xzf $TMP.tar.gz --strip-components=1
# run post-update commands if file exists
if [ -r ${HOME}/var/system/config-updater/post-update ]; then
. ${HOME}/var/system/config-updater/post-update
fi
else
- echo "Could not fetch updated config, $TMP is empty"
+ echo "Could not fetch updated config, $TMP.tar.gz is empty"
fi
else
- echo "Could not fetch updated config, $TMP is missing"
+ echo "Could not fetch updated config, $TMP.tar.gz is missing"
fi
-rm -f $TMP
+rm -f $TMP.tar.gz