From ab421f4f139b45f7fc6ec14ae4b6b24542e4b7dd Mon Sep 17 00:00:00 2001 From: davidovski Date: Fri, 3 Jun 2022 23:25:59 +0100 Subject: removed verbosity when removing packages --- xib.sh | 38 +++++++++++++++++++++++++++++++------- 1 file changed, 31 insertions(+), 7 deletions(-) (limited to 'xib.sh') diff --git a/xib.sh b/xib.sh index e2aaaff..a7eca0f 100755 --- a/xib.sh +++ b/xib.sh @@ -12,7 +12,8 @@ build_profile="/etc/xib_profile.conf" priv_key="xi.pem" -buildfiles="$xib_dir/buildfiles" +buildfiles="/home/david/docs/proj/xilinux/buildfiles" +#buildfiles="$xib_dir/buildfiles" seen="$xib_dir/seen" logs="$xib_dir/logs" chroot="$xib_dir/chroot" @@ -23,6 +24,18 @@ keychain="$xib_dir/keychain" quickfail=true +usage () { + cat << EOF +${LIGHT_RED}Usage: ${RED}xib [option] [package] +${BLUE}Avaiable Options: + ${BLUE}-d + ${LIGHT_CYAN}daemon; run as a daemon, automatically rebuilding all packages + ${BLUE}-p + ${LIGHT_CYAN}publish; publish packages in the stage to the repo +${RESET} +EOF +} + # publish any packages in the stage directory to the repo # publish_package () { @@ -96,7 +109,7 @@ build_package () { xibuild -v \ -C $1 \ - -d $stage \ + -o $stage \ -r $chroot \ -l $logs/$name.log \ -k $keychain/$priv_key \ @@ -198,7 +211,7 @@ xib_single () { && publish_package \ && { [ -e "$chroot/var/lib/xipkg/installed/$name" ] && { - xi -r $chroot -nyl remove $name + xi -r $chroot -nqyl remove $name } || true } } @@ -256,9 +269,20 @@ xibd () { [ "$#" = 0 ] && { xib_all } || { - [ "$1" = "-d" ] && - xibd || for x in $@; do - xib_single $x - done + case "$1" in + "-d") + xibd;; + "-p") + publish_package + ;; + "-h") + usage + ;; + *) + for x in $@; do + xib_single $x + done + ;; + esac } -- cgit v1.2.1