Changeset 32 for bootstrapper
- Timestamp:
- Jun 1, 2014, 4:34:21 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
bootstrapper/bootstrap.sh
r31 r32 10 10 ADDCRONJOBS=0 11 11 RUNINSTALL=0 12 13 DEPENDENCIES="xvfb mono-runtime rsync xmlstarlet" 12 INSTALLOPTIONALDEPS=0 13 14 DEPENDENCIES="gcc wget tr xvfb mono-runtime rsync xmlstarlet gcc" 14 15 15 16 if [ -n "$(command -v apt-get)" ]; then … … 92 93 } 93 94 95 checkSetupDeps() { 96 which gcc > /dev/null 97 if [ $? -ne 0 ]; then 98 echo "'gcc' not installed. Please install it and run this script again." 99 echo 0 100 return 101 fi 102 103 which wget > /dev/null 104 if [ $? -ne 0 ]; then 105 echo "'wget' not installed. Please install it and run this script again." 106 echo 0 107 return 108 fi 109 110 which tr > /dev/null 111 if [ $? -ne 0 ]; then 112 echo "'tr' not installed. Please install it and run this script again." 113 echo 0 114 return 115 fi 116 117 echo 1 118 } 119 94 120 setupUser() { 95 121 echo -e "Setting up user and group \"sdtd\"\n" … … 119 145 if [ $ISDEBIAN -eq 1 ]; then 120 146 update-rc.d 7dtd.sh defaults 121 else 122 echo 123 echo "Compiling start-stop-daemon" 124 cd /usr/local/lib/7dtd/start-stop-daemon 125 make 126 make install 127 128 sed -ir "s/^export SSD=.*$/export SSD=\/usr\/local\/lib\/7dtd\/start-stop-daemon\/start-stop-daemon/" /etc/7dtd.conf 129 fi 147 fi 148 149 echo 150 echo "Compiling start-stop-daemon" 151 cd /usr/local/lib/7dtd/start-stop-daemon 152 153 gcc -Wall -Wextra -Wno-return-type -o start-stop-daemon start-stop-daemon.c 154 chown root.root start-stop-daemon 155 chmod 0755 start-stop-daemon 156 157 #TODO: remove 158 sed -ir "s/^export SSD=.*$/export SSD=\/usr\/local\/lib\/7dtd\/start-stop-daemon\/start-stop-daemon/" /etc/7dtd.conf 159 130 160 echo -e "\n=============================================================\n\n" 131 161 } … … 195 225 echo 196 226 fi 227 else 228 if [ $(checkSetupDeps) -eq 0 ]; then 229 return 230 fi 197 231 fi 198 232 setupUser
Note:
See TracChangeset
for help on using the changeset viewer.