From 62c77b4e717a6b717656544171a7a2893aa5a9ca Mon Sep 17 00:00:00 2001 From: Christer Edwards Date: Wed, 5 Feb 2020 19:02:19 -0700 Subject: [PATCH] preparation for 0.6x initial release --- Makefile | 3 +++ usr/local/bin/bastille | 20 +++++++++---------- usr/local/share/bastille/convert.sh | 2 +- usr/local/share/bastille/update.sh | 2 +- usr/{ => local}/share/man/man1/bastille.1.gz | Bin 5 files changed, 15 insertions(+), 12 deletions(-) rename usr/{ => local}/share/man/man1/bastille.1.gz (100%) diff --git a/Makefile b/Makefile index 6e7aaec9..1629e307 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,9 @@ uninstall: @echo "Removing Bastille sub-commands" @rm -rvf /usr/local/share/bastille @echo + @echo "removing man page" + @rm -rvf /usr/local/share/man/man1/bastille.1.gz + @echo @echo "removing configuration file" @rm -rvf /usr/local/etc/bastille @echo diff --git a/usr/local/bin/bastille b/usr/local/bin/bastille index 07fbc89f..936d08df 100755 --- a/usr/local/bin/bastille +++ b/usr/local/bin/bastille @@ -32,7 +32,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin ## root check first. bastille_root_check() { - if [ $(id -u) -ne 0 ]; then + if [ "$(id -u)" -ne 0 ]; then ## so we can make it colorful . /usr/local/share/bastille/colors.pre.sh @@ -69,7 +69,7 @@ bastille_perms_check . /usr/local/etc/bastille/bastille.conf ## version -BASTILLE_VERSION="0.5.20191128" +BASTILLE_VERSION="0.6.20200202" usage() { cat << EOF @@ -131,13 +131,13 @@ esac # Filter out all non-commands case "${CMD}" in -cmd|convert|cp|create|destroy|export|import|list|pkg|rdr|restart|start|stop|sysrc|template|verify) +bootstrap|cmd|console|convert|cp|create) ;; -update|upgrade) +destroy|export|htop|import|limits|list) ;; -service|console|bootstrap|htop|top) +pkg|rdr|restart|service|start|stop|sysrc) ;; -bootstrap|update|upgrade|zfs) +template|top|update|upgrade|verify|zfs) ;; *) usage @@ -146,12 +146,12 @@ esac SCRIPTPATH="${bastille_sharedir}/${CMD}.sh" if [ -f "${SCRIPTPATH}" ]; then - : ${UMASK:=022} - umask ${UMASK} + : "${UMASK:=022}" + umask "${UMASK}" - : ${SH:=sh} + : "${SH:=sh}" - exec ${SH} "${SCRIPTPATH}" "$@" + exec "${SH}" "${SCRIPTPATH}" "$@" else echo -e "${COLOR_RED}${SCRIPTPATH} not found.${COLOR_RESET}" 1>&2 fi diff --git a/usr/local/share/bastille/convert.sh b/usr/local/share/bastille/convert.sh index c6378836..b56df2d7 100644 --- a/usr/local/share/bastille/convert.sh +++ b/usr/local/share/bastille/convert.sh @@ -32,7 +32,7 @@ . /usr/local/etc/bastille/bastille.conf usage() { - echo -e "${COLOR_RED}Usage: bastille convert name.${COLOR_RESET}" + echo -e "${COLOR_RED}Usage: bastille convert TARGET.${COLOR_RESET}" exit 1 } diff --git a/usr/local/share/bastille/update.sh b/usr/local/share/bastille/update.sh index 0c93e71f..8b01f915 100644 --- a/usr/local/share/bastille/update.sh +++ b/usr/local/share/bastille/update.sh @@ -32,7 +32,7 @@ . /usr/local/etc/bastille/bastille.conf usage() { - echo -e "${COLOR_RED}Usage: bastille update release | container.${COLOR_RESET}" + echo -e "${COLOR_RED}Usage: bastille update [release|container].${COLOR_RESET}" exit 1 } diff --git a/usr/share/man/man1/bastille.1.gz b/usr/local/share/man/man1/bastille.1.gz similarity index 100% rename from usr/share/man/man1/bastille.1.gz rename to usr/local/share/man/man1/bastille.1.gz