feat: print version upon start
This commit is contained in:
parent
249b0db90b
commit
8322f5bc38
1 changed files with 3 additions and 3 deletions
6
instalee
6
instalee
|
@ -83,11 +83,11 @@ installpkg() {
|
||||||
|
|
||||||
## EXECUTION
|
## EXECUTION
|
||||||
|
|
||||||
|
version=$(printf "$name r%s.%s%s" "$(git rev-list --count HEAD 2>/dev/null)" "$(git rev-parse --short HEAD 2>/dev/null)" "$(git diff-index HEAD | wc -l | sed 's|^[1-9]|-mod\0|')")
|
||||||
# TODO getopt
|
# TODO getopt
|
||||||
case "$1" in
|
case "$1" in
|
||||||
(-V|--version|"")
|
(-V|--version|"")
|
||||||
printf "$name r%s.%s%s\n" "$(git rev-list --count HEAD 2>/dev/null)" "$(git rev-parse --short HEAD 2>/dev/null)" "$(git diff-index HEAD | wc -l | sed 's|^[1-9]|-mod\0|')"
|
printf "$version\nTry '$0 --help' or 'man $name' for usage info\n" >&2
|
||||||
echo "Try '$0 --help' or 'man $name' for usage info" >&2
|
|
||||||
# TODO license https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion
|
# TODO license https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
|
@ -170,7 +170,7 @@ chmod +rx "$dir_home/handlers" -R
|
||||||
execdir=/tmp/instalee.$(date +%s)
|
execdir=/tmp/instalee.$(date +%s)
|
||||||
mkdir -p $execdir
|
mkdir -p $execdir
|
||||||
cd $execdir
|
cd $execdir
|
||||||
destress "Running in $execdir"
|
destress "Running $version in $execdir"
|
||||||
|
|
||||||
export INSTALEE_VERBOSE="${INSTALEE_VERBOSE:-2}"
|
export INSTALEE_VERBOSE="${INSTALEE_VERBOSE:-2}"
|
||||||
exitcode=0
|
exitcode=0
|
||||||
|
|
Loading…
Add table
Reference in a new issue