- Mar 7, 2021
- 30
- 22
yep, it worksSurround with quotes should do the trick
here are the updated scripts:
1.) Play natively on linux (and add cheat menu)
Bash:
#!/bin/bash
main() {
# delete all windows executables and libraries
find . -type f -iregex '.*\.\(exe\|dll\)' -delete
# copy nwjs over
cp -r ~/.local/rpgm_nw/nwjs/* "$PWD"
# copy cheat menu to the plugin folder
cp ~/.local/rpgm_nw/cheatmenu/* "$dir"/js/plugins
# add cheat menu to plugins.js
sed -i '/];/i,{"name":"Cheat_Menu","status":true,"description":"","parameters":{}}' "$dir"/js/plugins.js
echo "done"
}
# RPGM MV
if [ -d "$PWD"/www ]; then
dir=$PWD/www
main
# RPGM MZ
elif [ -d "$PWD"/js ]; then
dir=$PWD
main
else
echo "$PWD doesn't seem to be a valid RPG MV/MZ game, exiting."
fi
Bash:
#!/bin/bash
dir=$PWD/www
if [ -d "$dir" ]; then
# copy scripts over
cp -r ~/.local/rpgm_nw/file_case/* "$PWD"
# build pathdata
python build_asset_data.py
# edit plugins.js
sed -i $'/\\[/{a{"name":"kin-kun/PreloadXZ","status":true,"description":"","parameters":{}},\n:a;n;ba}' "$PWD"/www/js/plugins.js
echo "done"
else
echo "$PWD doesn't seem to be a valid RPG MV game, exiting."
fi