mirror of
https://github.com/ChocoTaco1/docker-tribesnext-server.git
synced 2026-01-19 16:14:45 +00:00
19 lines
417 B
Bash
19 lines
417 B
Bash
#!/bin/bash
|
|
|
|
# -- Generate an alphabetized autoexec index file because we can't trust the load order
|
|
SCRIPTS_DIR=$1
|
|
INDEX_FILE="$SCRIPTS_DIR"/autoexec/AutoExecIndex.cs
|
|
|
|
mkdir -p "$SCRIPTS_DIR"/library
|
|
mv -v "$SCRIPTS_DIR"/autoexec/*.cs "$SCRIPTS_DIR"/library/.
|
|
|
|
scripts=(
|
|
"$SCRIPTS_DIR"/library/*.cs
|
|
)
|
|
|
|
for i in "${scripts[@]##*/}"
|
|
do
|
|
echo "exec(\"scripts/library/${i}\");" >> $INDEX_FILE
|
|
done
|
|
|
|
cat $INDEX_FILE |