mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 17:43:05 +00:00
fix: update script: non-standard version numbers
store version output in new variable slice output indexed from beginning instead of end. allowing for custom build version numbers. also fix weird spacing from tabs being two spaces wide, sorry :)
This commit is contained in:
parent
872ec4809b
commit
075f25b829
1 changed files with 19 additions and 18 deletions
|
@ -35,12 +35,13 @@ url=`curl -s https://api.github.com/repos/writeas/writefreely/releases/latest |
|
||||||
|
|
||||||
# check current version
|
# check current version
|
||||||
|
|
||||||
current=`./writefreely -v`
|
bin_output=`./writefreely -v`
|
||||||
if [ -z "$current" ]; then
|
if [ -z "$bin_output" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Current version is v${current:(-5):5}"
|
current=${bin_output:12:5}
|
||||||
|
echo "Current version is v$current"
|
||||||
|
|
||||||
# grab latest version number
|
# grab latest version number
|
||||||
IFS='/'
|
IFS='/'
|
||||||
|
@ -51,7 +52,7 @@ echo "Latest release is $latest"
|
||||||
|
|
||||||
|
|
||||||
IFS='.'
|
IFS='.'
|
||||||
read -ra cv <<< "${current:(-5):5}"
|
read -ra cv <<< "$current"
|
||||||
read -ra lv <<< "${latest#v}"
|
read -ra lv <<< "${latest#v}"
|
||||||
|
|
||||||
IFS=' '
|
IFS=' '
|
||||||
|
|
Loading…
Reference in a new issue