~dieggsy/arch-pkgs

23faeb1ed64b01ed79dac1046183d443c3192799 — dieggsy 4 years ago 7d1f99d
Add -s option to update script (for optional signing)
1 files changed, 6 insertions(+), 5 deletions(-)

M update
M update => update +6 -5
@@ 4,7 4,7 @@

# options=$(getopt all git meta)
usage () {
    echo -e "usage: ./update [-f] [-h] [COMMAND]...\n"
    echo -e "usage: ./update [-f] [-s] [COMMAND]...\n"
    echo -e "Available commands:\n"
    echo "      git     only build git packages and add to repo"
    echo "      meta    only build meta-packages and add to repo"


@@ 18,6 18,7 @@ usage () {
while getopts ":f" opt; do
    case $opt in
        f) force="-f"; shift ;;
        s) sign="--sign"; shift ;;
        h) usage ;;
        \?) usage ;;
    esac


@@ 46,18 47,18 @@ mkdir -p $PKGDEST
mkdir -p $SRCDEST

if [ -n "$git" ]; then
    find ! -path "./dieggsy-*" -name PKGBUILD -execdir makepkg $force -scr --sign --noconfirm \;
    find ! -path "./dieggsy-*" -name PKGBUILD -execdir makepkg $force $sign -scr --noconfirm \;
    nothing=false
    cd $PKGDEST
    repo-add --sign -R -n dieggsy.db.tar.xz *-git*.pkg.tar.xz
    repo-add $sign -R -n dieggsy.db.tar.xz *-git*.pkg.tar.xz
    cd -
fi

if [ -n "$meta" ]; then
    find -path "./dieggsy-*" -name PKGBUILD -execdir makepkg $force -dc --sign --noconfirm \;
    find -path "./dieggsy-*" -name PKGBUILD -execdir makepkg $force $sign -dc --noconfirm \;
    nothing=false
    cd $PKGDEST
    repo-add --sign -R -n dieggsy.db.tar.xz dieggsy-*.pkg.tar.xz
    repo-add $sign -R -n dieggsy.db.tar.xz dieggsy-*.pkg.tar.xz
    cd -
fi