Index: appfs-mkfs ================================================================== --- appfs-mkfs +++ appfs-mkfs @@ -22,12 +22,20 @@ # THE SOFTWARE. # PATH="${PATH}:$(cd "$(dirname "$(which "$0")")" && pwd)" -if [ "$1" == '--cpio' ]; then +if [ "$1" = '--cpio' ]; then shift + + if [ "$1" = '--beta' ]; then + shift + + setLatest=0 + else + setLatest=1 + fi mode='file' pkgfile="$1" else @@ -46,11 +54,11 @@ if [ -n "${sitecert}" ]; then sitecert="$(readlink -f "${sitecert}")" fi if [ -z "${pkgsdir}" -a -z "${pkgfile}" ] || [ -z "${appfsdir}" ]; then - echo 'Usage: appfs-mk {--cpio |} [ []]' >&2 + echo 'Usage: appfs-mk {--cpio [--beta] |} [ []]' >&2 exit 1 fi appfsdir="$(cd "${appfsdir}" && pwd)" @@ -151,11 +159,11 @@ find . -type d -print0 | xargs -0 -- touch -t "${dirdate}" # If this archive contains exactly one package mark it as the latest version chk_package="$(echo *)" if [ -d "${chk_package}" ]; then - default_isLatest='1' + default_isLatest="${setLatest:-1}" fi cat "${oldpackagelistfile}" 2>/dev/null | ( if [ -d "${chk_package}" ]; then sed 's@^\('"{chk_package}"',.*\),1@\1,0@'