Minor updates
This commit is contained in:
parent
375ff9a2b7
commit
46d2c3e91a
2 changed files with 37 additions and 1 deletions
33
test.sh
Executable file
33
test.sh
Executable file
|
|
@ -0,0 +1,33 @@
|
|||
#!/bin/bash
|
||||
|
||||
INSTALL_PATH=$HOME/.apps/Helium
|
||||
|
||||
GIT_VERSION=$(curl -s https://api.github.com/repos/imputnet/helium-linux/releases/latest | grep "tag_name" | tr -d \", | awk '{print $2}')
|
||||
LOCAL_VERSION=$($INSTALL_PATH/helium-browser.AppImage --version | awk '{print $2}')
|
||||
|
||||
LOCAL_VERSION_NUM=$(echo $LOCAL_VERSION | tr -d .)
|
||||
GIT_VERSION_NUM=$(echo $GIT_VERSION | tr -d .)
|
||||
|
||||
echo $GIT_VERSION
|
||||
echo $LOCAL_VERSION
|
||||
echo
|
||||
echo $GIT_VERSION_NUM
|
||||
echo $LOCAL_VERSION_NUM
|
||||
|
||||
if [ "$GIT_VERSION_NUM" -eq "$LOCAL_VERSION_NUM" ] ; then
|
||||
echo "Version is equal"
|
||||
exit 0
|
||||
|
||||
elif [ "$GIT_VERSION_NUM" -gt "$LOCAL_VERSION_NUM" ] ; then
|
||||
echo "Version is more recent"
|
||||
exit 0
|
||||
|
||||
elif [ "$GIT_VERSION_NUM" -lt "$LOCAL_VERSION_NUM" ] ; then
|
||||
echo "Version is older"
|
||||
exit 0
|
||||
|
||||
else
|
||||
echo "Something's fishy... EXITING"
|
||||
exit 1
|
||||
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue