diff options
| author | 2010-07-28 17:21:10 +0200 | |
|---|---|---|
| committer | 2010-07-28 17:21:10 +0200 | |
| commit | 73aa2d9fbe17c021e03310df9b0de11c68c4cd1d (patch) | |
| tree | f8559c71e57e873d2add7b42f028e72d227ca567 | |
| parent | Move old scripts to old script directory. (diff) | |
| download | GitTools-73aa2d9fbe17c021e03310df9b0de11c68c4cd1d.tar.xz GitTools-73aa2d9fbe17c021e03310df9b0de11c68c4cd1d.zip | |
Finish new uploader script.
| -rwxr-xr-x | uploadNewGit.sh | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/uploadNewGit.sh b/uploadNewGit.sh index 10c61c7..a669e5f 100755 --- a/uploadNewGit.sh +++ b/uploadNewGit.sh @@ -1,12 +1,30 @@ #!/bin/sh -gitdir="$(pwd)" -gitdir="$(readlink -f '$gitdir') - +gitdir=$(readlink -f "$(pwd)") +name=`basename "$gitdir" | cut -d / -f 2 | cut -d ' ' -f 1` description="$1" -if [ ! -d $gitdir/.git ]; then +if [ ! -d "$gitdir/.git" ]; then echo Not a git repo. - exit 1; + exit 1 +fi +if [ -z "$description" ]; then + echo You need to specify a description argument. + exit 1 fi +pushd ~/Projects/gitolite-admin/conf > /dev/null +echo "Writing config.." +(echo +echo " repo $name" +echo " RW+CD = zx2c4" +echo " R = @all" +echo " $name \"Jason A. Donenfeld\" = \"$description\"") >> gitolite.conf +git commit -a -m "Adding $name to repository." +git push +popd > /dev/null + +git remote add origin gitcode@zx2c4.com:$name +git push origin master +git push --all +git push --tags
\ No newline at end of file |
