-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathinstall.sh
29 lines (26 loc) · 881 Bytes
/
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
#!/bin/bash
echo
sleep 1
printf "[ProTip] It's Better to Run this script as root, in order to execute this program by typing only aix into the cmd line without the path\n"
echo
sleep 1
build(){
printf "Building Binaries..\n"
mkdir ~/.aix 2>/dev/null
g++ src/AixCrypt.cpp -o ~/.aix/XKgenerate
g++ src/AixDecrypt.cpp -o ~/.aix/XKproducer
}
preprocess(){
printf "Generating Preprocessor's Instruction Required For Compiling aix command\n"
printf "#define XKP "'"'"$HOME/.aix/XKproducer"'"'"\n" > pts.h
printf "#define XKK "'"'"$HOME/.aix/XKgenerate"'"'"\n" >> pts.h
}
build
preprocess
g++ aix.cpp -o aix
if [ $(whoami) == "root" ];then
cp aix /bin/aix
printf "Succeed, You can now run this program by typing aix in your terminal\n"
else
printf "You Can Copy ./aix to /bin to use it without full path (Or Any directory you Prefer presented in the PATH Variable)\n"
fi