summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xhome/bin/config-update.sh24
-rwxr-xr-xsrc/zshrc.sh3
2 files changed, 15 insertions, 12 deletions
diff --git a/home/bin/config-update.sh b/home/bin/config-update.sh
index a0dc1bb..1c644a0 100755
--- a/home/bin/config-update.sh
+++ b/home/bin/config-update.sh
@@ -7,19 +7,23 @@ cd ${HOME}
# fetch file from server
TMP=`mktemp -u --suffix=".tar.gz" "config-updater-XXXXXX"`
-curl -s "${URL}${FILE}" > $TMP
+curl -s "${URL}${FILE}" -o $TMP
-# check if file is empty
-if [ -s $TMP ]; then
- if [ -r ${HOME}/var/system/config-updater/pre-update ]; then
- source ${HOME}/var/system/config-updater/pre-update
- fi
- tar -xzf $TMP --strip-components=1
- if [ -r ${HOME}/var/system/config-updater/pre-update ]; then
- source ${HOME}/var/system/config-updater/pre-update
+# check if file exists and is not empty
+if [ -e $TMP ]; then
+ if [ -s $TMP ]; then
+ if [ -r ${HOME}/var/system/config-updater/pre-update ]; then
+ source ${HOME}/var/system/config-updater/pre-update
+ fi
+ tar -xzf $TMP --strip-components=1
+ if [ -r ${HOME}/var/system/config-updater/pre-update ]; then
+ source ${HOME}/var/system/config-updater/pre-update
+ fi
+ else
+ echo "Could not fetch updated config, $TMP is empty"
fi
else
- echo "Could not fetch updated config, $TMP is empty"
+ echo "Could not fetch updated config, $TMP is missing"
fi
rm -f $TMP
diff --git a/src/zshrc.sh b/src/zshrc.sh
index 36b76d7..ab04605 100755
--- a/src/zshrc.sh
+++ b/src/zshrc.sh
@@ -5,5 +5,4 @@ BASEDIR=`dirname $(readlink -f $0)`
cd ${BASEDIR}/../
rm -f gen/.zshrc
-WGET=$(which wget)
-$WGET -q -O gen/.zshrc http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc
+curl -s http://git.grml.org/f/grml-etc-core/etc/zsh/zshrc -o gen/.zshrc