X-Git-Url: https://ruderich.org/simon/gitweb/?p=config%2Fdotfiles.git;a=blobdiff_plain;f=archive.sh;fp=archive.sh;h=4a205a2d8da307f46aa2aadc9a4dd2d89b957059;hp=0000000000000000000000000000000000000000;hb=c9709be14cb6f88c5c8c41b26c805d0acfd4d45b;hpb=95e5182f46cb976ac8a077d039e104a8584807d2 diff --git a/archive.sh b/archive.sh new file mode 100755 index 0000000..4a205a2 --- /dev/null +++ b/archive.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Create an archive of my configuration file which can be uploaded on a +# server. +# +# Usage: ./archive.sh + + +git_clone() { + git clone "$1" "$2" > /dev/null + cwd=`pwd` + cd "$2" && git remote rm origin && git gc && cd "$cwd" +} + +git_clone . tmp/dotfiles +for name in browser shell vcs vim x11; do + echo cloning $name to tmp/ + git_clone $name tmp/dotfiles/$name +done + +echo creating dotfiles.tar +tar cf tmp/dotfiles.tar -C tmp dotfiles +echo moving dotfiles.tar to . +mv tmp/dotfiles.tar . + +rm -rf tmp