factorimods : ctrl+c - ctrl+v fail. My bad.
This commit is contained in:
parent
ee9cccb2e1
commit
a762fe780f
@ -19,11 +19,13 @@ cd $factorio_dir/saves
|
|||||||
save=$(ls -t *.zip | grep -v autosave | rev | cut -d "." -f 2- | rev | dmenu -i -l 5 -p "Chose a save file: ")
|
save=$(ls -t *.zip | grep -v autosave | rev | cut -d "." -f 2- | rev | dmenu -i -l 5 -p "Chose a save file: ")
|
||||||
|
|
||||||
test $? -ne 0 && echo "No save selected" && exit 1
|
test $? -ne 0 && echo "No save selected" && exit 1
|
||||||
|
echo $save
|
||||||
|
|
||||||
if test $1 = "-r" ; then
|
if test "$1" = "-r" ; then
|
||||||
cp mod-list.json_$modlist mod-list.json_$save
|
cp ../mods/mod-list.json mod-list.json_$save
|
||||||
|
modlist=$save
|
||||||
#Check if a modlist exists for that save
|
#Check if a modlist exists for that save
|
||||||
elif test -s mod-list.json_$save ; then
|
elif test -s "mod-list.json_$save" ; then
|
||||||
modlist=$save
|
modlist=$save
|
||||||
else
|
else
|
||||||
#Otherwise, prompt to load another modlist
|
#Otherwise, prompt to load another modlist
|
||||||
@ -35,6 +37,7 @@ else
|
|||||||
echo -e "yes\nno" | dmenu -p "Save selected modlist for savegame $save ?" | grep -q "yes" && cp mod-list.json_$modlist mod-list.json_$save && modlist=$save
|
echo -e "yes\nno" | dmenu -p "Save selected modlist for savegame $save ?" | grep -q "yes" && cp mod-list.json_$modlist mod-list.json_$save && modlist=$save
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo $modlist
|
||||||
#Link that modlist to the file read by factorio
|
#Link that modlist to the file read by factorio
|
||||||
ln -fs ../saves/mod-list.json_$modlist ../mods/mod-list.json
|
ln -fs ../saves/mod-list.json_$modlist ../mods/mod-list.json
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user