Skip to content

Commit 2b0a8c7

Browse files
committed
Fixed issues with Build.sh and SDK.sh
1 parent c221bec commit 2b0a8c7

File tree

2 files changed

+14
-7
lines changed

2 files changed

+14
-7
lines changed

src/Build.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
echo "Enter SDK name: "
22
read name
3-
mkdir Build
3+
if [ ! -d $PWD/Build ]; then
4+
mkdir $PWD/Build
5+
fi
46
cd Build
7+
make clean
58
echo "Build in Debug mode?"
69
select yn in "Yes" "No"; do
710
case $yn in
8-
Yes ) cmake .. -DGame=$name -DCMAKE_BUILD_TYPE=Debug; break;;
9-
No ) cmake .. -DGame=$name; break;;
11+
Yes ) cmake .. -DGAME=$name -DCMAKE_BUILD_TYPE=Debug; break;;
12+
No ) cmake .. -DGAME=$name; break;;
1013
esac
1114
done
15+
make

src/SDK.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@ echo "Enter SDK name: "
22
read name
33
STARTDIR=$PWD
44
cd sdks
5-
if [ ! -d $PWD/sdks/hl2sdk-$name ]; then
6-
mkdir $PWD/sdks/hl2sdk-$name
5+
if [ ! -d $PWD/hl2sdk-$name ]; then
6+
mkdir $PWD/hl2sdk-$name
77
fi
88
cd hl2sdk-$name
99
hg init
1010
hg revert --all
11-
hg pull https://hg.alliedmods.net/hl2sdks/hl2sdk-$name
11+
hg pull -u https://hg.alliedmods.net/hl2sdks/hl2sdk-$name
1212
if [ -d $STARTDIR/patches/hl2sdk-$name ]; then
13-
cp -R $STARTDIR/patches/hl2sdk-$name $STARTDIR/sdks/hl2sdk-$name
13+
cd ..
14+
cd ..
15+
cd patches/hl2sdk-$name
16+
cp -r * $STARTDIR/sdks/hl2sdk-$name
1417
fi

0 commit comments

Comments
 (0)