From 550982f69e89d734f835f4cee83a1bb73aca116f Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Tue, 4 Oct 2011 13:31:44 +0530 Subject: [PATCH] I forgot I still have Solaris users... change some obvious bashisms. There may be more, however, so if you find them, let me know. --- src/gl-admin-push | 8 ++++---- src/gl-dryrun | 6 +++--- src/gl-setup | 10 +++++----- src/gl-system-install | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/gl-admin-push b/src/gl-admin-push index bd1112e..4e2a073 100755 --- a/src/gl-admin-push +++ b/src/gl-admin-push @@ -6,7 +6,7 @@ die() { echo "$@"; exit 1; } >&2 # if GL_BINDIR was not passed in, find it [ -z "$GL_BINDIR" ] && - GL_BINDIR=$( perl -ne 'print($1), exit if /^command="(.+?)\/gl-(time|auth-command) /' < $HOME/.ssh/authorized_keys) + GL_BINDIR=` perl -ne 'print($1), exit if /^command="(.+?)\/gl-(time|auth-command) /' < $HOME/.ssh/authorized_keys` # GL_BINDIR still not known? we have a problem... [ -z "$GL_BINDIR" ] && { cat </dev/null) +GL_RC=`get_rc_val GL_RC 2>/dev/null` [ -z "$GL_RC" ] && die "hmm weird... GL_RC is undefined; ABORTING" -GL_BINDIR=$( get_rc_val GL_BINDIR ) -GL_ADMINDIR=$(get_rc_val GL_ADMINDIR) +GL_BINDIR=` get_rc_val GL_BINDIR ` +GL_ADMINDIR=`get_rc_val GL_ADMINDIR` # and finally: git push "$@" diff --git a/src/gl-dryrun b/src/gl-dryrun index a8b03fa..286c27e 100755 --- a/src/gl-dryrun +++ b/src/gl-dryrun @@ -51,7 +51,7 @@ echo; echo "PLEASE READ WARNINGS IN SOURCE BEFORE USING!"; echo export oldhome=$HOME export oldpwd=$PWD -export tmp=$(mktemp -d); +export tmp=`mktemp -d` trap "rm -rf $tmp" 0; cd $tmp @@ -97,8 +97,8 @@ echo echo "checking what pubkeys (if any) have push rights..." for f in `find .gitolite/keydir -name "*.pub" | sort` do - f=$(basename $f) - u=$(perl -e '$u = shift; $u =~ s/(\@[^.]+)?\.pub$//; print $u' $f) + f=`basename $f` + u=`perl -e '$u = shift; $u =~ s/(\@[^.]+)?\.pub$//; print $u' $f` SSH_ORIGINAL_COMMAND=info $GL_BINDIR/gl-auth-command $u | grep R...W..gitolite-admin.$ > /dev/null && echo ' '$f done echo diff --git a/src/gl-setup b/src/gl-setup index be69315..bc892ac 100755 --- a/src/gl-setup +++ b/src/gl-setup @@ -24,7 +24,7 @@ get_rc_val() { ${0%/*}/gl-query-rc $1 } -TEMPDIR=$(mktemp -d -t tmp.XXXXXXXXXX) +TEMPDIR=`mktemp -d -t tmp.XXXXXXXXXX` export TEMPDIR trap "/bin/rm -rf $TEMPDIR" 0 @@ -52,7 +52,7 @@ else fi export GL_RC -GL_RC=$(get_rc_val GL_RC 2>/dev/null) +GL_RC=`get_rc_val GL_RC 2>/dev/null` [ -z "$GL_RC" ] && GL_RC=$HOME/.gitolite.rc if [ -f $GL_RC ] @@ -101,9 +101,9 @@ fi export GL_BINDIR export REPO_BASE export GL_ADMINDIR -GL_BINDIR=$( get_rc_val GL_BINDIR ) -REPO_BASE=$( get_rc_val REPO_BASE ) -GL_ADMINDIR=$(get_rc_val GL_ADMINDIR) +GL_BINDIR=` get_rc_val GL_BINDIR ` +REPO_BASE=` get_rc_val REPO_BASE ` +GL_ADMINDIR=`get_rc_val GL_ADMINDIR` # now we get to gitolite itself diff --git a/src/gl-system-install b/src/gl-system-install index 3fec38d..296ab4f 100755 --- a/src/gl-system-install +++ b/src/gl-system-install @@ -45,7 +45,7 @@ buildroot=$4; [ -n "$1" ] && [ -z "$3" ] && die "I need all 3 directories or none at all" # supply default values to args 1, 2, and 3 if not provided [ -z "$1" ] && { - euid=$(perl -e 'print $>') + euid=`perl -e 'print $>'` if [ "$euid" = "0" ] then set /usr/local/bin /var/gitolite/conf /var/gitolite/hooks