From a62a275f25a53c675dd3e815463919bd0930a066 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Wed, 5 Sep 2012 13:06:11 -0300 Subject: The logic was backwards :| --- git-shell-commands/change-description | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'git-shell-commands/change-description') diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index 437833c..120b1cd 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -5,8 +5,7 @@ set -E repo=$1; shift -description="$@" -echo "${repo}.git/${description}" > description +echo "${@}" > ${repo}.git/description exit $? -- cgit v1.2.3-54-g00ecf From c562e291c0adca7cb7dd2e1ce5ac26e1cd405603 Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Sat, 8 Sep 2012 20:00:33 -0300 Subject: Exit on error --- git-shell-commands/change-description | 2 +- git-shell-commands/create-bare-repo | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'git-shell-commands/change-description') diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index 120b1cd..d29eaa8 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -2,7 +2,7 @@ # Allows users to change project description # $ ssh git@host change-description repo "description" -set -E +set -e repo=$1; shift diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo index 14a640b..b0174e2 100755 --- a/git-shell-commands/create-bare-repo +++ b/git-shell-commands/create-bare-repo @@ -2,15 +2,15 @@ # Allows users to create repo.git # $ ssh git@host create-bare-repo repo1 repo2 ... -set -E +set -e for i in $@; do # Cleanup names - i="`echo "$i" | sed "s/[^a-z0-9\.\-\_]//gi"`" + repo="`echo "$i" | sed "s/[^a-z0-9\.\-\_]//gi"`" - if [ -z "$i" ]; then continue; fi + if [ -z "$repo" ]; then continue; fi - mkdir "$i".git - pushd "$i".git + mkdir "$repo".git + pushd "$repo".git git init --bare done -- cgit v1.2.3-54-g00ecf From 791d3e1553d0a8b4103bb499fce26688b8cf217a Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Sat, 8 Sep 2012 20:11:43 -0300 Subject: Retrieve help --- git-shell-commands/change-description | 5 +++-- git-shell-commands/create-bare-repo | 5 +++-- git-shell-commands/help | 12 ++++++++++++ git-shell-commands/mirror | 5 +++-- 4 files changed, 21 insertions(+), 6 deletions(-) create mode 100755 git-shell-commands/help (limited to 'git-shell-commands/change-description') diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index d29eaa8..c8abdab 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -1,6 +1,7 @@ #!/bin/sh -# Allows users to change project description -# $ ssh git@host change-description repo "description" +# * change-description +# Allows users to change project description +# ssh git@host change-description repo "description" set -e diff --git a/git-shell-commands/create-bare-repo b/git-shell-commands/create-bare-repo index b0174e2..ec98b33 100755 --- a/git-shell-commands/create-bare-repo +++ b/git-shell-commands/create-bare-repo @@ -1,6 +1,7 @@ #!/bin/sh -# Allows users to create repo.git -# $ ssh git@host create-bare-repo repo1 repo2 ... +# * create-bare-repo +# Allows users to create repo.git +# ssh git@host create-bare-repo repo1 repo2 ... set -e diff --git a/git-shell-commands/help b/git-shell-commands/help new file mode 100755 index 0000000..45f0bd6 --- /dev/null +++ b/git-shell-commands/help @@ -0,0 +1,12 @@ +#!/bin/sh +# * help +# Gets available commands +# ssh git@host help + +set -e + +# Gets three lines from every git-shell-command +for c in `dirname $0`/*; do + head -q -n4 $c | tail -n3 | sed "s/^..//" + echo +done diff --git a/git-shell-commands/mirror b/git-shell-commands/mirror index 6a2c254..c634b9e 100755 --- a/git-shell-commands/mirror +++ b/git-shell-commands/mirror @@ -1,6 +1,7 @@ #!/bin/sh -# Mirrors a repository -# ssh git@host mirror git://url/repo.git +# * mirror +# Mirrors a repository +# ssh git@host mirror git://url/repo.git set -E -- cgit v1.2.3-54-g00ecf From 1a5c75ab9e3540535109fe3be058be298514ce10 Mon Sep 17 00:00:00 2001 From: Ernesto Bazzano Date: Wed, 17 Apr 2013 20:33:31 -0300 Subject: traduccion prelimiar de los hackings --- git-shell-commands/change-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-shell-commands/change-description') diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index c8abdab..a4cb197 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -1,6 +1,6 @@ #!/bin/sh # * change-description -# Allows users to change project description +# Cambia la descripcion del projecto, necesita archivo description en el proyecto # ssh git@host change-description repo "description" set -e -- cgit v1.2.3-54-g00ecf From ae95c2980b8aa8459155381a6644027325c6385b Mon Sep 17 00:00:00 2001 From: Nicolás Reynolds Date: Wed, 11 Sep 2013 01:37:38 -0300 Subject: Test for repo here too... --- git-shell-commands/change-description | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'git-shell-commands/change-description') diff --git a/git-shell-commands/change-description b/git-shell-commands/change-description index a4cb197..730777c 100755 --- a/git-shell-commands/change-description +++ b/git-shell-commands/change-description @@ -7,6 +7,6 @@ set -e repo=$1; shift -echo "${@}" > ${repo}.git/description +test -d ${repo}.git && echo "${@}" > ${repo}.git/description exit $? -- cgit v1.2.3-54-g00ecf