more verbose update
This commit is contained in:
8
bake
8
bake
@@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
## VERSION 22.6.1
|
||||
## VERSION 22.6.2
|
||||
## BASH-MAKE ==========================================================
|
||||
## Utility to mimick some of GNU Make behavior, but run in a single
|
||||
## bash shell. This executable can be used as the Bakefile, too,
|
||||
@@ -114,9 +114,15 @@ _source_bakefile() {
|
||||
. "$BAKEFILE"
|
||||
fi; }
|
||||
_update_self() {
|
||||
printf "Update %s => %s\n" \
|
||||
"$( grep "^## VERSION" "$0" | awk '{ print $3 }' )" \
|
||||
"$( curl -s -S -f \
|
||||
"https://raw.githubusercontent.com/moonq/bake/main/bake" | \
|
||||
grep "^## VERSION" | awk '{ print $3 }' )" >&2 || true
|
||||
curl -S -f -o "$0" -z "$0" \
|
||||
"https://raw.githubusercontent.com/moonq/bake/main/bake"
|
||||
chmod +x "$0"
|
||||
echo Updated. >&2
|
||||
}
|
||||
@() { echo +"$@" >&2; "$@"; } # Print command before running it
|
||||
|
||||
|
||||
Reference in New Issue
Block a user