From a76ddbccedbd9873342629d07fdb0cd8ba536cc0 Mon Sep 17 00:00:00 2001 From: David Kaufmann Date: Mon, 14 Nov 2011 01:39:32 +0100 Subject: update --- bin/load.sh | 41 +++++++++++++---------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) (limited to 'bin/load.sh') 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 -- cgit v1.2.3