diff options
Diffstat (limited to 'bin/load.sh')
| -rwxr-xr-x | bin/load.sh | 41 |
1 files changed, 13 insertions, 28 deletions
diff --git a/bin/load.sh b/bin/load.sh index 1a4a88f..31f0652 100755 --- a/bin/load.sh +++ b/bin/load.sh @@ -2,34 +2,19 @@ WGET=$(which wget) URL="http://pluto.fsinf.at/~astra/config/" +FILE="skel.tar.gz" +CLEAN=".vim" -FILES=".hushlogin .Xdefaults .zshrc .zshrc.local .zprofile .muttrc .gitconfig .gitignore .screenrc bin/latextags bin/ltags" -UNPACK="vim.tar.gz" -CLEAN=".vim .vimrc" -DIRECTORIES="bin" +# fetch file from server +$WGET -q "${URL}${FILE}" -cd ~ - -for i in $DIRECTORIES -do - mkdir -p ${i} -done - -# remove local files -for i in $FILES $UNPACK $CLEAN -do - rm -rf ${i} -done +if [ $1 -eq "clean"]; then + for i in $CLEAN + do + echo "rm -rf ${i}" + done +fi -# fetch files from server -for i in $FILES $UNPACK -do - ${WGET} -q ${URL}${i} -done - -# unpack tgz's -for i in $UNPACK -do - tar xzf ${i} - rm ${i} -done +cd ~ +tar -xzf $FILE --strip-components=1 +rm $FILE |
