diff options
| author | David Kaufmann <astra@ionic.at> | 2017-04-26 01:41:50 +0200 |
|---|---|---|
| committer | David Kaufmann <astra@ionic.at> | 2017-04-26 01:41:50 +0200 |
| commit | d7ff0b69b9bd0794bf946f77f97f9f01272a2086 (patch) | |
| tree | e2c12d3f278ef6edb846be4a37d6ed7dd44e920e /home/bin/config-update.sh | |
| parent | f4dd7a1c32211e8412c276d33483eed4109a6789 (diff) | |
| download | config-d7ff0b69b9bd0794bf946f77f97f9f01272a2086.tar.gz | |
restructure update
Diffstat (limited to 'home/bin/config-update.sh')
| -rw-r--r--[-rwxr-xr-x] | home/bin/config-update.sh | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/home/bin/config-update.sh b/home/bin/config-update.sh index 6dc7deb..61bfabb 100755..100644 --- a/home/bin/config-update.sh +++ b/home/bin/config-update.sh @@ -1,34 +1,3 @@ -#!/bin/bash +#!/bin/sh -URL="http://pluto.fsinf.at/~astra/config/" -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 - -# check if file exists and is not empty -if [ -e $TMP ]; then - if [ -s $TMP ]; 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 - - # 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" - fi -else - echo "Could not fetch updated config, $TMP is missing" -fi - -rm -f $TMP +curl -L -s https://pluto.fsinf.at/~astra/config/load.sh | sh |
