diff options
| author | David Kaufmann <astra@ionic.at> | 2017-04-26 01:17:30 +0200 |
|---|---|---|
| committer | David Kaufmann <astra@ionic.at> | 2017-04-26 01:17:30 +0200 |
| commit | e1b999bf49f71d1c78ad8f53f0f9291cafd7e142 (patch) | |
| tree | e82e239d94b5dfe8a8bc58d782ade6c0206e5258 | |
| parent | a4bde9ae3273eceb125d2916baa78fd6714aa75a (diff) | |
| download | config-e1b999bf49f71d1c78ad8f53f0f9291cafd7e142.tar.gz | |
remove wget, add curl
| -rwxr-xr-x | home/bin/config-update.sh | 24 | ||||
| -rwxr-xr-x | src/zshrc.sh | 3 |
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 |
