diff options
author | Caleb Maclennan | 2014-03-15 18:18:31 +0200 |
---|---|---|
committer | Caleb Maclennan | 2014-03-15 18:18:31 +0200 |
commit | 93ddb343027b64d385018efa792a44df1878f522 (patch) | |
tree | 254be2eedcec06227a249671cebbc05ff9c83d7c | |
parent | 7652ccbb84c6b630c5cf72ecaaaed566a8367ebc (diff) | |
download | aur-93ddb343027b64d385018efa792a44df1878f522.tar.gz |
patch sh syntax error
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 11 | ||||
-rw-r--r-- | posix.patch | 42 |
3 files changed, 53 insertions, 5 deletions
@@ -1,15 +1,18 @@ pkgbase = gitzone pkgdesc = git-based zone management tool for static and dynamic domains pkgver = 1.0 - pkgrel = 2 + pkgrel = 3 url = https://github.com/dyne/gitzone arch = any license = AGPL3 depends = perl depends = bind + depends = zsh backup = etc/gitzone.conf source = gitzone-1.0::https://github.com/dyne/gitzone/archive/v1.0.tar.gz + source = posix.patch md5sums = 7dfedb6b4d350db97ed41f40519f4961 + md5sums = 83693eb3154bfb94412fe83c429b84e6 pkgname = gitzone @@ -1,18 +1,21 @@ # Maintainer: Caleb Maclennan <caleb@alerque.com> + pkgname=gitzone pkgver=1.0 -pkgrel=2 +pkgrel=3 url=https://github.com/dyne/gitzone pkgdesc='git-based zone management tool for static and dynamic domains' arch=('any') license=('AGPL3') -depends=('perl' 'bind') -source=("${pkgname}-${pkgver}::https://github.com/dyne/$pkgname/archive/v${pkgver}.tar.gz") -md5sums=('7dfedb6b4d350db97ed41f40519f4961') +depends=('perl' 'bind' 'zsh') +source=("${pkgname}-${pkgver}::https://github.com/dyne/$pkgname/archive/v${pkgver}.tar.gz" 'posix.patch') +md5sums=('7dfedb6b4d350db97ed41f40519f4961' + '83693eb3154bfb94412fe83c429b84e6') backup=('etc/gitzone.conf') package() { cd "$srcdir/$pkgname-$pkgver" + patch -p0 < $srcdir/posix.patch find -type f -execdir sed -i 's#libexec/gitzone#share/gitzone/libexec#g' {} \; find -type f -execdir sed -i 's#var/bind#var/named#p' {} \; find -type f -execdir sed -i 's#var/cache/bind#var/cache/named#p' {} \; diff --git a/posix.patch b/posix.patch new file mode 100644 index 000000000000..1d3346a66699 --- /dev/null +++ b/posix.patch @@ -0,0 +1,42 @@ +--- bin/gitzone-install~ 2014-03-15 17:59:13.090966492 +0200 ++++ bin/gitzone-install 2014-03-15 18:10:33.343601968 +0200 +@@ -24,19 +24,19 @@ + + if [ -z $1 ]; then + echo "usage: gitzone-install username [ id_rsa.pub ]"; +- return 0; fi ++ exit 0; fi + + uid="`id -u`" + if ! [ "$uid" = "0" ]; then + echo "this script needs to be run as root." +- return 1; fi ++ exit 1; fi + + user="$1" + + # check user argument + grep "^$user" /etc/passwd > /dev/null +-if ! [ $? = 0 ]; then echo "error: user not found: $user"; return 1; fi +-if ! [ -r /home/$user ]; then echo "error: user home not found: /home/$user"; return 1; fi ++if ! [ $? = 0 ]; then echo "error: user not found: $user"; exit 1; fi ++if ! [ -r /home/$user ]; then echo "error: user home not found: /home/$user"; exit 1; fi + if [ -r /home/$user/zones/$user/.git ]; then + echo "error: gitzone already installed for user $user"; + else # create gitzone directory in user home +@@ -102,12 +102,12 @@ + + + key="$2" # add ssh key +-if [ -z "$key" ]; then return 0; fi +-if ! [ -r $key ]; then echo "warning: key not found $key"; return 1; fi ++if [ -z "$key" ]; then exit 0; fi ++if ! [ -r $key ]; then echo "warning: key not found $key"; exit 1; fi + mkdir -p /home/$user/.ssh + touch /home/$user/.ssh/authorized_keys + cat $key >> /home/$user/.ssh/authorized_keys + chmod -R go-rwx /home/$user/.ssh + chown -R $user:$user /home/$user/.ssh + echo "ssh public key $key added for $user" +-return 0 ++exit 0 |