
@Pentarctagon noticed in commit 9a34cbb329
that $UID isn't set when
/bin/sh isn't GNU Bash. `id -u` is specified by POSIX:
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/id.html
Also move `-xe` to a `set` command (in case someone runs scripts with
`sh path/to/script` instead of `path/to/script`) and add `set -u` to
complain more loudly about such unset variables.
14 lines
382 B
Bash
Executable file
14 lines
382 B
Bash
Executable file
#!/bin/sh
|
|
|
|
set -xeu
|
|
|
|
# Run this script from directory containing windows installer(s)
|
|
# passing needed version as argument
|
|
|
|
PATH="$PATH:$HOME/.config/itch/apps/butler"
|
|
|
|
rm -rf Itchio_source
|
|
7z x wesnoth-$1-win64.exe -oItchio_source
|
|
rm -rf Itchio_source/'$PLUGINSDIR'
|
|
echo itch > Itchio_source/data/dist
|
|
butler push --userversion=$1 Itchio_source wesnoth/battle-for-wesnoth:win-beta
|