added autoupdating for scripts
This commit is contained in:
parent
b4f4188524
commit
74d0c543f2
1 changed files with 10 additions and 1 deletions
|
@ -14,6 +14,15 @@ extra_params_start_server=""
|
||||||
script_dir="$(cd "$(dirname "$0")" && pwd)"
|
script_dir="$(cd "$(dirname "$0")" && pwd)"
|
||||||
cd ${script_dir}
|
cd ${script_dir}
|
||||||
|
|
||||||
|
# Check if the current directory is inside a Git repository.
|
||||||
|
if [ -d .git ] || git rev-parse --is-inside-work-tree > /dev/null 2>&1 ; then
|
||||||
|
# Pull updated scripts from CoastalCommits.
|
||||||
|
git pull
|
||||||
|
else
|
||||||
|
# The current directory is not part of a Git repository.
|
||||||
|
echo "WARNING: This directory is not a Git repository. Script updates will not be automatically fetched."
|
||||||
|
fi
|
||||||
|
|
||||||
# This handles automatically updating the Factorio binary.
|
# This handles automatically updating the Factorio binary.
|
||||||
wget https://factorio.com/get-download/stable/headless/linux64 -O factorio_headless.tar.xz
|
wget https://factorio.com/get-download/stable/headless/linux64 -O factorio_headless.tar.xz
|
||||||
tar -xf factorio_headless.tar.xz --strip-components=1 --overwrite
|
tar -xf factorio_headless.tar.xz --strip-components=1 --overwrite
|
||||||
|
|
Loading…
Reference in a new issue