- 0 okay,
- 1 charfile does not exist,
- 2 charfile syntax error,
- 3 usage error/invalid option,
- 4 other error"
+ 0 okay,
+ 1 charfile does not exist,
+ 2 charfile syntax error,
+ 3 usage error/invalid option,
+ 4 other error"
+}
+
+function version_check(){
+ NEW_VERSION=$(curl -s https://codeberg.org/armaan/charsel/raw/branch/master/charsel \
+ | grep VERSION= | tail -c +9)
+ if [[ $VERSION != $NEW_VERSION ]]
+ then
+ echo "an update is available"
+ else
+ echo "you are up to date"
+ fi
+