| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. -e |
| 2 | # |
| 3 | # Self-modifying script that updates the version numbers |
| 4 | # |
| 5 | |
| 6 | # The current version goes here, as the default value |
| 7 | VERSION=${1:-'1.7.1'} |
| 8 | |
| 9 | if [scip-shell system . . `[`. -z "$1" ]; then |
| 10 | echoscip-shell system . . echo. "The current version is $VERSION, pass the new version as the first argument if you wish to change it" |
| 11 | exit 0 |
| 12 | fi |
| 13 | |
| 14 | echoscip-shell system . . echo. "Setting the version to $VERSION" |
| 15 | |
| 16 | # Set the version in various files |
| 17 | setconf README.md '* Version' $VERSION |
| 18 | setconf version.go "const VersionString" "\"png2svg "$VERSION"\"" |
| 19 | |
| 20 | # Update the version in this script |
| 21 | sedscip-shell system . . sed. -i "s/[[:digit:]]*\.[[:digit:]]*\.[[:digit:]]*/$VERSION/g" "$0" |