finish quoting vars
This commit is contained in:
parent
e37ab1ac65
commit
74422a7228
8
run.sh
8
run.sh
|
@ -13,12 +13,12 @@ export XDG_CONFIG_HOME="$dir/etc/"
|
|||
if pactl stat &> /dev/null ; then
|
||||
export ALSA_CONFIG_PATH="$dir/etc/asound.conf"
|
||||
fi
|
||||
cd $dir
|
||||
cd "$dir"
|
||||
|
||||
game_swf="$dir/Anodyne_STANDALONE_1_506.swf"
|
||||
game_savefile="$dir/etc/freshwrapper-data/Shockwave Flash/WritableRoot/#SharedObjects/ANODYNE1/#localWithNet/$game_swf/ANODYNE_SAVE_123.sol"
|
||||
|
||||
if [[ ${1:-NaN} =~ ^[1-9][0-9]*$ ]] ; then
|
||||
if [[ "${1:-NaN}" =~ ^[1-9][0-9]*$ ]] ; then
|
||||
scale="$1"
|
||||
else
|
||||
scale=$( (grep -Poa '(?<=scale_factor.).' "$game_savefile" | od -An -N1 -td1) || echo 3)
|
||||
|
@ -28,6 +28,6 @@ width=$((scale * 160))
|
|||
height=$((scale * 180))
|
||||
device_scale=`echo "scale=10; sqrt($scale/3)" | bc`
|
||||
|
||||
sed -i "s/^device_scale = .*/device_scale = $device_scale/" $dir/etc/freshwrapper.conf
|
||||
sed -i "s/^device_scale = .*/device_scale = $device_scale/" "$dir/etc/freshwrapper.conf"
|
||||
|
||||
exec env LD_LIBRARY_PATH=$dir/lib $dir/bin/npplayer src="$game_swf" width="$width" height="$height" pepperflash_path="$dir/lib/plugins/libpepflashplayer.so"
|
||||
exec env LD_LIBRARY_PATH="$dir/lib" "$dir/bin/npplayer" src="$game_swf" width="$width" height="$height" pepperflash_path="$dir/lib/plugins/libpepflashplayer.so"
|
||||
|
|
Loading…
Reference in New Issue