index : devtools32 | |
Archlinux32 fork of devtools | gitolite user |
summaryrefslogtreecommitdiff |
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-12-02 08:33:33 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-12-04 18:00:57 +0100 |
commit | 56d4dec19fbcec23f677114e4104bb9df902ed9f (patch) | |
tree | c7a8cf2484db200d810f37a01b1226fef59f90c5 /rebuildpkgs.in | |
parent | f62f307c8490a3018941e2a8805a082e001b95e2 (diff) |
-rw-r--r-- | rebuildpkgs.in | 10 |
diff --git a/rebuildpkgs.in b/rebuildpkgs.in index d8fbdbe..f7b1612 100644 --- a/rebuildpkgs.in +++ b/rebuildpkgs.in @@ -11,14 +11,14 @@ m4_include(lib/common.sh) -if [ $# -le 1 ]; then +if (( $# < 1 )); then echo "usage: $(basename $0) <chrootdir> <packages to rebuild>" echo " example: $(basename $0) ~/chroot readline bash foo bar baz" exit 1 fi # Source makepkg.conf; fail if it is not found -if [ -r '/etc/makepkg.conf' ]; then +if [[ -r '/etc/makepkg.conf' ]]; then source '/etc/makepkg.conf' else die '/etc/makepkg.conf not found!' @@ -63,7 +63,7 @@ for pkg in $pkgs; do msg2 "Building '$pkg'" /usr/bin/svn update "$pkg" - if [ ! -d "$pkg/trunk" ]; then + if [[ ! -d "$pkg/trunk" ]]; then FAILED="$FAILED $pkg" warning "$pkg does not exist in SVN" continue @@ -77,7 +77,7 @@ for pkg in $pkgs; do error "$pkg Failed!" else pkgfile=$(pkg_from_pkgbuild) - if [ -e "$pkgfile" ]; then + if [[ -e $pkgfile ]]; then msg2 "$pkg Complete" else FAILED="$FAILED $pkg" @@ -87,7 +87,7 @@ for pkg in $pkgs; do done cd "$REBUILD_ROOT" -if [ "$FAILED" != "" ]; then +if [[ -n $FAILED ]]; then msg 'Packages failed:' for pkg in $FAILED; do msg2 "$pkg" |