diff options
author | Rubba Reduppa | 2011-08-11 22:44:09 -0700 |
---|---|---|
committer | yar | 2015-07-03 16:58:12 -0700 |
commit | 8b150b43d276c827b6f591aa5559541be5d9bc61 (patch) | |
tree | 8a5c97c9d82b18af5b735a37ce3f48847bd23acb /nconfig-wrapper | |
parent | 649bfd82414ecb1a1a12aafa471284aeff3eb7a5 (diff) | |
download | aur-8b150b43d276c827b6f591aa5559541be5d9bc61.tar.gz |
bug fixes, legacy_pty support
Diffstat (limited to 'nconfig-wrapper')
-rwxr-xr-x | nconfig-wrapper | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/nconfig-wrapper b/nconfig-wrapper index c1f6856d7094..70b50f32ea63 100755 --- a/nconfig-wrapper +++ b/nconfig-wrapper @@ -1,8 +1,9 @@ #!/bin/bash -[ -a ./package-this ] || { +[ -a ./nconfig-wrapper ] || { echo "You have to run this from the same directory!" exit 1 } +croak() { echo "ERROR: $@"; exit; } [ -f /etc/bash.functions ] && . /etc/bash.functions [ -f /usr/share/ppz/bash.functions ] && . /usr/share/ppz/bash.functions [ "$1" ] && REPO="$1" || croak USAGE: ./package-this [repo-directory] @@ -29,9 +30,13 @@ askyn "update package?" && { sed -i 's/^[#]*\s*\(return\s*1\)$/# \1/ig' PKGBUILD makepkg -oecd makepkg -cd - PF=$(ls -1tr *.pkg.tar.xz | tail -n 1) - mv $PF ${REPO} - repo-add ${REPO}/hir.db.tar.gz ${REPO}/$PF + PF=$(ls -1Atr linux-linode-*.pkg.tar.xz | tail -n 1) + mv "${PF}" "${REPO}"/ + repo-add "${REPO}"/hir.db.tar.gz "${REPO}/${PF}" + IFS=$'\n' + for file in $(ls -1Atr "${REPO}"/linux-linode-*.pkg.tar.xz | head -n -1); do + rm -i "$file" + done } || { sed -i 's/^[#]*\s*\(return\s*1\)$/# \1/ig' PKGBUILD makepkg -oecd |