-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall.sh
More file actions
executable file
·38 lines (36 loc) · 822 Bytes
/
Copy pathinstall.sh
File metadata and controls
executable file
·38 lines (36 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
erase=false
while getops ":e:-:" opt;
do
case $opt in
e)
erase=true
;;
-)
case "$OPTARG" in
erase)
erase=true
;;
*)
echo "Invalid option: --$OPTARG" >&2
;;
esac
;;
\?)
echo "Invalid option: -$OPTARG" >&2
;;
esac
done
if [ -d "build" ]
then
rm -rf build
fi
mkdir build
cd build
cmake ..
cmake --build .
cd ..
if [ $erase == true ]
then
rm -rf build
fi