You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
trap 'echo "Interrupted"; rm main; cp employeeLogin.c.bak employeeLogin.c; cp mainMenu.c.bak mainMenu.c; cp createEmployeeAccount.c.bak createEmployeeAccount.c; rm employeeLogin.c.bak; rm mainMenu.c.bak; rm createEmployeeAccount.c.bak; cd ..; rm -r build; exit' SIGINT
clear ceedling test:all rm -r build/
cd src/
sed '/John Doe/,$d' employeesCredentialsList.txt > temp.txt mv temp.txt employeesCredentialsList.txt
sed '/Name : John/,$d' employeesData.txt > temp.txt mv temp.txt employeesData.txt
# backup files for file in employeeLogin.c mainMenu.c createEmployeeAccount.c; do cp "$file" "$file.bak" done
# replace .c with .h in respective files #sed -i 's/createEmployeeAccount.c/createEmployeeAccount.h/g' mainMenu.c #sed -i 's/showGeneralInfoEmployee.c/showGeneralInfoEmployee.h/g' employeeLogin.c #sed -i 's/mainMenu.c/mainMenu.h/g' employeeLogin.c #sed -i 's/employeeLogin.c/employeeLogin.h/g' createEmployeeAccount.c
# remove 'src/' for file in employeeLogin.c createEmployeeAccount.c; do sed -i 's/src\///g' "$file" done
gcc mainMenu.c error.c createEmployeeAccount.c showGeneralInfoEmployee.c employeeLogin.c createCustomer.c helperFunctions.c loginCustomer.c customerMenu.c main.c calculatorAdd.c calculatorDivide.c calculatorFactorial.c calculatorGetUserInput.c calculatorGetUserInputFactorial.c calculatorMultiply.c calculatorSubtract.c displayMenuCalculator.c -o main ./main rm main
# restore backups for file in employeeLogin.c mainMenu.c createEmployeeAccount.c; do cp "$file.bak" "$file" done
# remove backups for file in employeeLogin.c.bak mainMenu.c.bak createEmployeeAccount.c.bak; do rm "$file" done
cd ..
|