File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 55# ##############################################################################
66SCRIPTVERSION=" $( git describe --tags --always) "
77
8-
9- SUMPATH=$( printf " https://github.com/devnw/gvm/releases/download/%s/gvm .sum" " $SCRIPTVERSION " )
10- EXPECTEDSUM=$( curl -L " $SUMPATH " )
8+ GVMURL= $( printf " https://github.com/devnw/gvm/releases/download/%s/gvm " " $SCRIPTVERSION " )
9+ SUMPATH=$( printf " %s .sum" " $GVMURL " )
10+ EXPECTEDSUM=$( curl -sL " $SUMPATH " )
1111
1212if [[ " $EXPECTEDSUM " != " " && $( shasum -a 256 " $0 " ) != " $EXPECTEDSUM " ]]
1313then
14- echo " Checksum mismatch; expected $EXPECTEDSUM , got $( shasum -a 256 " $0 " ) "
15- exit 1
14+
15+ printf " New Version of GVM [%s] Available would you like to update? " " $SCRIPTVERSION "
16+
17+ read -rp " [Yes: Y or y | No: Enter]? " yn
18+
19+ # Only trigger on `Y` or `y`
20+ if [[ " $yn " == " Y" || " $yn " == " y" ]]
21+ then
22+ curl -sL " $GVMURL " -o " $0 "
23+ fi
1624fi
1725
1826help () {
You can’t perform that action at this time.
0 commit comments