56 lines
1.4 KiB
Bash
Executable File
56 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
#AUTOBUILDER - semi-automated build system for TinI/O
|
|
export proceed=0 #global ok flag
|
|
proceed() #exits the program if proceed isn't true
|
|
{
|
|
if [ $proceed -eq 0 ]
|
|
then
|
|
echo "Error! The last action autobuild tried to perform failed."
|
|
exit 1
|
|
fi
|
|
proceed=0
|
|
}
|
|
setcolor()#sets the color of stdout to yellow
|
|
{
|
|
tput setaf 1
|
|
tput setab 7
|
|
}
|
|
resetcolor()
|
|
{
|
|
tput sgv0
|
|
}
|
|
#START
|
|
|
|
echo " --------------------------" #fancy banner!
|
|
echo " Autobuilder for TinI/O 0.1"
|
|
echo " --------------------------"
|
|
echo " Verifying main directory..."
|
|
[ -d configutility ] && [ -d tinio ] && proceed=1 #check if we're in the right dir
|
|
proceed #error check
|
|
echo " DONE!"
|
|
echo " Entering the library directory..."
|
|
cd cylib && proceed=1 #cd to the lib dir
|
|
proceed #error check
|
|
echo " DONE!"
|
|
echo " Compiling and installing the library..."
|
|
make && proceed=1 #compiles the lib according to the lib docs
|
|
proceed
|
|
echo " DONE!"
|
|
echo " Library installation complete."
|
|
echo " Going back..."
|
|
cd .. && proceed=1 #to main dir
|
|
proceed
|
|
echo " DONE!"
|
|
echo " Entering the TinI/O build directory"
|
|
cd tinio && proceed=1
|
|
proceed
|
|
echo " DONE!"
|
|
echo " Compiling TinI/O"
|
|
make && make install && proceed=1
|
|
proceed
|
|
echo " DONE!"
|
|
echo " Compiling the flasher tool"
|
|
cd ../tool && make && proceed=1
|
|
echo " DONE!"
|
|
echo -e "\n\n\nThe TinI/O installation is completed."
|