gsl-statique-litterateur/var/lib/gsl/scripts/gsl__version

34 lines
889 B
Plaintext
Raw Normal View History

2022-06-14 18:51:19 +02:00
#!/bin/bash
# file: gsl__version
# Folder: /var/lib/gsl/scripts
# By echolib (XMPP: im@echolib.re)
# License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, 19 November 2007
#======================================================================
# Version checker of GSL with less or more details
#======================================================================
version__OPTIONS() {
case "$1" in
-v)
awk 'NR==2 {print "# Installed:",$3}' "/usr/local/bin/$app_name"
exit
;;
-vv)
v_cur=`awk 'NR==2 {print $3}' "/usr/local/bin/$app_name"`
echo -n "# $app_name Current: $v_cur | "
if__command curl
v_onl=`curl -s "$repo" | awk 'NR==2 {print $3}'`
echo -ne "Online: $v_onl\n"
exit
;;
--version)
awk 'NR==2 {print "# Installed:",$3}' "/usr/local/bin/$app_name"
if__file "$gsl_dir_lib/new-version.md" read
exit
;;
esac
}