# HG changeset patch # User Christophe Lincoln # Date 1488310545 -3600 # Node ID 08132ef79601e313e56df014956a3ad011260d28 # Parent f63ac3e0e9da2adcb32c1f86bcac06345f23442e Add run command, small fixes, getting ready for initial release diff -r f63ac3e0e9da -r 08132ef79601 sup --- a/sup Tue Feb 28 19:35:14 2017 +0100 +++ b/sup Tue Feb 28 20:35:45 2017 +0100 @@ -31,15 +31,17 @@ $(boldify $(gettext "Commands:")) -c cook $(gettext "Cook a package from the wok") + -r run $(gettext "Run sup_install without installing") -e extract $(gettext "Extract a package to current dir") -i install $(gettext "Install a new package") -u update $(gettext "Update installed package") -r remove $(gettext "Remove package files") - -n new $(gettext "Create a new package :-)") + -n new $(gettext "Create a new SUP package :-)") -l list $(gettext "List installed packages in your wok") $(boldify $(gettext "Options:")) - --install update $(gettext "Install updates") + --install update $(gettext "Install all updates from mirror") + --force update $(gettext "Force recharging packages database") --init cook $(gettext "Initialize sup cook environment") --verbose all $(gettext "Display more output messages") @@ -148,9 +150,9 @@ cp -rf ${wok}/${pkg} ${cache}/${supfile%.sup} cd ${cache}/${supfile%.sup} - # Move to hidden dir: ~/.local and ~/.config - for dir in local config; do - mv files/${dir} files/.${dir} + # Move to hidden dir: ~/.local ~/.config ~./icons + for dir in local config icons; do + [ -d "files/${dir}" ] && mv files/${dir} files/.${dir} done # Add $build_date @@ -167,10 +169,11 @@ echo "$(gettext 'Packages:') $(colorize 035 $supfile) ($size)" rm -rf ${cache} && newline ;; - run) + -r|run) # Run sup_install() without any installation to help package creation pkg="$2" receip="$wok/$pkg/receip" + work="$supcook/sup_install" # Sanity check check_pkg_arg "$1" @@ -179,11 +182,14 @@ fi newline - echo "$(gettext 'Running') $(colorize 36 $pkg) $(colorize 035 sup_install)" + echo "$(colorize 33 $(gettext 'Running') sup_install\(\):) $(colorize 35 $pkg)" separator - - echo "To be continued" - ;; + mkdir -p ${work} && cd ${work} + . ${wok}/${pkg}/receip + sup_install + separator + gettext "Working folder:"; echo " $work" + newline ;; -n|new) pkg="$2"