Bisa / factorio-init

Factorio init script
MIT License
414 stars 82 forks source link

Integration with updater #190

Closed fellnerse closed 2 years ago

fellnerse commented 2 years ago

I tried to use the factorio update command with [this](Integration with ) repository but could not get it to work. The problem always is that somehow your script overwrites the UPDATE_SCRIPT env variable with /path/to/update_factorio.py and then can not find the script. also your test if the variable is set is not correct imho. It should be

 if  [ -z "${UPDATE_SCRIPT}" ]; then

instead of

 if ! [ -e "${UPDATE_SCRIPT}" ]; then

I tried to even set the value of UPDATE_SCRIPT directly in the script with: export UPDATE_SCRIPT='...'. This worked in the first few lines, but was overwritten till the call of the update function.

Can I help you there somehow?

I really love the tool so far. Currently I solved it with using another env variable UPDATE_SCRIPT2 which works like a charm.

Bisa commented 2 years ago

Hi, a bit of a late reply - but did you try to set the path in your config file? (that's the only place where this script sets the value of this variable), also, the check is not for the variables existence - it checks to make sure the script at the path exists and is executable "-e".

Feel free to re-open this if you still have the same problems after setting the path in your config file :)

fellnerse commented 1 year ago

I'm not using this anymore so can not tell