-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·45 lines (42 loc) · 1.68 KB
/
install.sh
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
39
40
41
42
43
44
45
#!/bin/bash
#If build is failing we are adding an extra optin that cleans the bulidenv to start from scratch
if [[ "$1" == "--reset" ]]; then
sudo rm -r ./buildenv
elif [[ "$1" == "--easyinstall" ]]; then
echo "You have invoked easy install"
echo "this way of building expects you to have gotten all the needed packages manually"
make -f ManualMake.mk all
mv ./build/executables/tester.o ./
mv ./tester.o ./perftool
elif [[ "$1" == "--install" ]]; then
echo "==========PERF-TOOL=========="
echo "This is a command line installer for our tool."
echo "This script will install the following packages and libaries"
echo "1.Vcpkg [Package]"
echo "2.Curl [Libaries]"
echo "3.Pthreads [Library]"
read -p $'\n\nContinue with installation [Y/n] :' option
if [[ "$option" == "n" ]]; then
echo "See you later , bye bye :)"
else
if [[ "$2" == "--apt" ]]; then
sudo apt-get install build-essential tar zip unzip cmake
else
sudo pacman -S base-devel tar zip unzip cmake
fi
echo "Starting install process"
mkdir buildenv
git clone https://github.com/Microsoft/vcpkg.git ./buildenv/vcpkg
./buildenv/vcpkg/bootstrap-vcpkg.sh
cd ./buildenv/vcpkg/
./vcpkg install curl
./vcpkg install pthreads
cd .. && cd ..
cmake . -DCMAKE_TOOLCHAIN_FILE=./buildenv/vcpkg/scripts/buildsystems/vcpkg.cmake
make
fi
else
echo "Please enter a valid argument!"
fi
#shell script , disctors package manager to get basic program , Vcpkg to get more specific needed
#packaged , cmake to tie up C and Vcpkg , it compies the program to give "perftool"