index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Allan McRae <allan@archlinux.org> | 2011-01-23 00:13:24 +1000 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-01-22 10:02:51 -0600 |
commit | b947db040c2c586636fc290f0fadbe89e9802450 (patch) | |
tree | c09e257facb8da23bc5559c87bdc6ba1af0ef499 /scripts | |
parent | 3863e48788e2424c4f1469e72dabda6fba595c4c (diff) |
-rw-r--r-- | scripts/repo-add.sh.in | 20 |
diff --git a/scripts/repo-add.sh.in b/scripts/repo-add.sh.in index 87c7834f..c3db7d9f 100644 --- a/scripts/repo-add.sh.in +++ b/scripts/repo-add.sh.in @@ -234,9 +234,9 @@ db_write_entry() if [[ -d $pkgname-$pkgver ]]; then warning "$(gettext "An entry for '%s' already existed")" "$pkgname-$pkgver" else - if [ $DELTA -eq 1 ]; then + if (( DELTA )); then pkgentry=$(find_pkgentry $pkgname) - if [ -n "$pkgentry" ]; then + if [[ -n $pkgentry ]]; then local oldfilename=$(grep -A1 FILENAME $pkgentry/desc | tail -n1) local oldfile="$(dirname $1)/$oldfilename" fi @@ -302,14 +302,16 @@ db_write_entry() fi # create a delta file - if [ -n "$oldfilename" ]; then - if [ -f "$oldfile" ]; then - delta=$(pkgdelta -q $oldfile $1) - if [ -f "$delta" ]; then - db_write_delta $delta + if (( DELTA )); then + if [[ -n $oldfilename ]]; then + if [[ -f $oldfile ]]; then + delta=$(pkgdelta -q $oldfile $1) + if [[ -f $delta ]]; then + db_write_delta $delta + fi + else + warning "$(gettext "Old package file not found: %s")" "$oldfilename" fi - else - warning "$(gettext "Old package file not found: %s")" "$oldfilename" fi fi |