Skip to content

Commit e1be878

Browse files
Version 1.3
1 parent 08c55bf commit e1be878

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

install_nquakesv.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
# nQuakesv Installer Script v1.2 (for Linux)
3+
# nQuakesv Installer Script v1.3 (for Linux)
44
# by Empezar & dimman
55

66
defaultdir="~/nquakesv"
@@ -24,7 +24,7 @@ which unzip >/dev/null || error "The package 'unzip' is not installed. Please in
2424
which curl >/dev/null || error "The package 'curl' is not installed. Please install it and run the nQuakesv installation again."
2525

2626
echo
27-
echo "Welcome to the nQuakesv v1.1 installation"
27+
echo "Welcome to the nQuakesv v1.3 installation"
2828
echo "========================================="
2929
echo
3030
echo "Press ENTER to use [default] option."
@@ -68,7 +68,7 @@ read hostname
6868
[ ! -z "$hostname" ] || hostname=$defaulthostname
6969

7070
# IP/dns
71-
printf "Enter your servers DNS. [use external IP]: "
71+
printf "Enter your server's DNS. [use external IP]: "
7272
read hostdns
7373

7474
# How many ports to run
@@ -81,7 +81,7 @@ read ports
8181
# Run qtv?
8282
printf "Do you wish to run a qtv proxy? (y/n) [y]: "
8383
read qtv
84-
[ ! -z "$qtv" ] || qtv=y
84+
[ ! -z "$qtv" ] || qtv="y"
8585

8686
# Run qwfwd?
8787
printf "Do you wish to run a qwfwd proxy? (y/n) [y]: "
@@ -113,7 +113,7 @@ read rcon
113113
rcon=$defaultrcon
114114
}
115115

116-
if [ "$qtv" == "y" ]
116+
if [ "$qtv" = "y" ]
117117
then
118118
# Qtv password
119119
defaultqtvpass="changeme"
@@ -183,7 +183,7 @@ wget --inet4-only -O qsw106.zip $mirror/qsw106.zip || error "Failed to download
183183
wget --inet4-only -O sv-gpl.zip $mirror/sv-gpl.zip || error "Failed to download $mirror/sv-gpl.zip"
184184
wget --inet4-only -O sv-non-gpl.zip $mirror/sv-non-gpl.zip || error "Failed to download $mirror/sv-non-gpl.zip"
185185
wget --inet4-only -O sv-configs.zip $mirror/sv-configs.zip || error "Failed to download $mirror/sv-configs.zip"
186-
if [ "$binary" == "x86_64" ]
186+
if [ "$binary" = "x86_64" ]
187187
then
188188
wget --inet4-only -O sv-bin-x64.zip $mirror/sv-bin-x64.zip || error "Failed to download $mirror/sv-bin-x64.zip"
189189
[ -s "sv-bin-x64.zip" ] || error "Downloaded sv-bin-x64.zip but file is empty?!"
@@ -215,7 +215,7 @@ printf "* Extracting nQuakesv setup files (1 of 2)..."
215215
printf "* Extracting nQuakesv setup files (2 of 2)..."
216216
(unzip -qqo sv-non-gpl.zip 2>/dev/null && echo done) || echo fail
217217
printf "* Extracting nQuakesv binaries..."
218-
if [ "$binary" == "x86_64" ]
218+
if [ "$binary" = "x86_64" ]
219219
then
220220
(unzip -qqo sv-bin-x64.zip 2>/dev/null && echo done) || echo fail
221221
else
@@ -244,7 +244,7 @@ printf "* Removing distribution files..."
244244
printf "* Converting DOS files to UNIX..."
245245
for file in $(find $directory -iname "*.cfg" -or -iname "*.txt" -or -iname "*.sh" -or -iname "README")
246246
do
247-
[ ! -f "$file" ] || sed -ie 's/\r\n/\n/' $file
247+
[ ! -f "$file" ] || sed -i 's///g' $file
248248
done
249249
echo "done"
250250

@@ -276,7 +276,7 @@ sed -i "s/NQUAKESV_PATH/${safe_pattern}/g" $directory/start_servers.sh
276276
safe_pattern=$(printf "%s\n" "$rcon" | sed 's/[][\.*^$/]/\\&/g')
277277
sed -i "s/NQUAKESV_RCON/${safe_pattern}/g" $directory/ktx/pwd.cfg
278278
#/qtv/qtv.cfg
279-
if [ "$qtv" == "y" ]
279+
if [ "$qtv" = "y" ]
280280
then
281281
safe_pattern=$(printf "%s\n" "$hostname" | sed 's/[][\.*^$/]/\\&/g')
282282
sed -i "s/NQUAKESV_HOSTNAME/${safe_pattern}/g" $directory/qtv/qtv.cfg
@@ -286,7 +286,7 @@ then
286286
ln -s ../ktx/demos demos
287287
fi
288288
#/qwfwd/qwfwd.cfg
289-
if [ "$qwfwd" == "y" ]
289+
if [ "$qwfwd" = "y" ]
290290
then
291291
safe_pattern=$(printf "%s\n" "$hostname" | sed 's/[][\.*^$/]/\\&/g')
292292
sed -i "s/NQUAKESV_HOSTNAME/${safe_pattern}/g" $directory/qwfwd/qwfwd.cfg

0 commit comments

Comments
 (0)