diff --git a/updateScript.sh b/updateScript.sh index e69de29..ff7fd32 100755 --- a/updateScript.sh +++ b/updateScript.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +echo "Update script for Foundry Plugin" + +echo "Get Updates from remote if nessesary" +git pull + +# Assume the correct version is set in module js +echo "Extract version" + +PACKAGE_VERSION=$(cat module.json \ + | grep \"version\" \ + | head -1 \ + | awk -F: '{ print $2 }' \ + | sed 's/[",]//g' \ + | tr -d '[[:space:]]') + +echo $PACKAGE_VERSION \ No newline at end of file