f92a64afb4
bash is not installed as /bin/bash on all systems, a number of
cataclysm's shell scripts nevertheless use #!/bin/bash, meaning
they fail on systems which do not use this specific location
(including, but by no means limited to, *BSD). Most of them are
actually sh scripts and could use #!/bin/sh, the exceptions are:
* lang/merge_po.sh: uses shopt
* lang/update_pot.sh: uses == to test string equality; trivially
changed to use = and be an sh script
* tools/json_format_check.sh: uses bash arrays.
This changes the sh scripts to use #!/bin/sh and bash scripts to
use #!/usr/bin/env bash, which are both much more likely to work
on any unix-like system. (The applicable standards still do not
guarantee /bin/sh or /usr/bin/env will exist, but they also do not
guarantee that the system will support the #! construct at all.)
31 lines
494 B
Bash
31 lines
494 B
Bash
#!/bin/sh
|
|
|
|
if (pwd | grep "Cataclysm-DDA/tools")
|
|
then
|
|
cd ..
|
|
else
|
|
if (ls Cataclysm-DDA)
|
|
then
|
|
echo "Cataclysm-DDA already exists"
|
|
else
|
|
git clone https://github.com/CleverRaven/Cataclysm-DDA
|
|
fi
|
|
cd Cataclysm-DDA
|
|
fi
|
|
|
|
make
|
|
|
|
cd ..
|
|
|
|
if (ls dgamelaunch)
|
|
then
|
|
echo "dgamelaunch already exists"
|
|
else
|
|
git clone https://github.com/C0DEHERO/dgamelaunch
|
|
fi
|
|
cd dgamelaunch
|
|
|
|
./autogen.sh --enable-sqlite --enable-shmem --with-config-file=/opt/dgamelaunch/cdda/etc/dgamelaunch.conf
|
|
make
|
|
sudo ./dgl-create-chroot
|