Browse Source

Tweaks to package-add

Nathaniel van Diepen 10 years ago
parent
commit
65fbb22c8c
2 changed files with 3 additions and 3 deletions
  1. 2 2
      bin/package-add
  2. 1 1
      etc/PKGBUILD.in

+ 2 - 2
bin/package-add

@@ -29,10 +29,10 @@ if [[ "$1" != "" ]];then
 		cp etc/PKGBUILD.in src/$1/PKGBUILD;
 		case $btype in
 			git)
-				echo -e "pkgver=0.0.0\npkgver() {\n\tcd \"${srcdir%/*}/source\"\n\tif git describe --tags > /dev/null 2>&1;then\n\t\tgit describe --tags --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g';\n\telse\n\t\tdate +%Y%m%d;\n\tfi;}"|cat - src/$1/PKGBUILD > /tmp/out && mv /tmp/out src/$1/PKGBUILD;
+				echo -e "pkgver=0.0.0\npkgver() {\n\tcd \"\${srcdir%/*}/source\"\n\tif git describe --tags > /dev/null 2>&1;then\n\t\tgit describe --tags --long | sed -E 's/([^-]*-g)/r\1/;s/-/./g';\n\telse\n\t\tdate +%Y%m%d;\n\tfi;}"|cat - src/$1/PKGBUILD > /tmp/out && mv /tmp/out src/$1/PKGBUILD;
 			;;
 			svn)
-				echo -e "pkgver=0.0.0\npkgver() {\n\tcd \"${srcdir%/*}/source\"\n\tlocal ver="$(svnversion)"\n\tprintf \"r%s\" \"${ver//[[:alpha:]]}\"\n}"|cat - src/$1/PKGBUILD > /tmp/out && mv /tmp/out src/$1/PKGBUILD;
+				echo -e "pkgver=0.0.0\npkgver() {\n\tcd \"\${srcdir%/*}/source\"\n\tlocal ver=\"\$(svnversion)\"\n\tprintf \"r%s\" \"\${ver//[[:alpha:]]}\"\n}"|cat - src/$1/PKGBUILD > /tmp/out && mv /tmp/out src/$1/PKGBUILD;
 			;;
 			script)
 				echo -e "pkgver=0.0.0\npkgver() {\n  date +%Y%m%d\n}"|cat - src/$1/PKGBUILD > /tmp/out && mv /tmp/out src/$1/PKGBUILD;

+ 1 - 1
etc/PKGBUILD.in

@@ -2,7 +2,7 @@ pkgrel=
 pkgdesc=
 license=()
 url=
-arch=('x86-64' 'i686')
+arch=('x86_64' 'i686')
 source=('$pkgname.tar.gz')
 build() {
 	make