2016-02-21 12:16:11 +01:00
|
|
|
#!/bin/bash
|
|
|
|
# When scanning for demos, the project manager sorts them based on their
|
|
|
|
# timestamp, i.e. last modification date. This can make for a pretty
|
2017-02-05 00:53:55 +01:00
|
|
|
# messy output, so this script 'touches' each godot.cfg file in reverse
|
2016-02-21 12:16:11 +01:00
|
|
|
# alphabetical order to ensure a nice listing.
|
|
|
|
#
|
|
|
|
# It's good practice to run it once before packaging demos on the build
|
|
|
|
# server.
|
|
|
|
|
|
|
|
if [ ! -d "demos" ]; then
|
|
|
|
echo "Run this script from the root directory where 'demos/' is contained."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -e demos.list ]; then
|
|
|
|
rm -f demos.list
|
|
|
|
fi
|
|
|
|
|
|
|
|
for dir in 2d 3d gui misc viewport; do
|
2017-02-05 00:53:55 +01:00
|
|
|
find "demos/$dir" -name "godot.cfg" |sort >> demos.list
|
2016-02-21 12:16:11 +01:00
|
|
|
done
|
|
|
|
cat demos.list |sort -r > demos_r.list
|
|
|
|
|
|
|
|
while read line; do
|
|
|
|
touch $line
|
|
|
|
sleep 0.2
|
|
|
|
done < demos_r.list
|
|
|
|
|
|
|
|
#rm -f demos.list demos_r.list
|