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 _file_information.h; do cp "$file" "$file.bak" done # remove 'src/' for file in employeeLogin.c createEmployeeAccount.c _file_information.h; 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 checkLoanEligibility.c currencyExchange.c currentCustomerAccountBalance.c depositMoney.c displayDisclaimer.c interestCalculator.c requestLoan.c sendMoney.c updateCustomerAccountBalance.c withdrawMoney.c -o main ./main rm main # restore backups for file in employeeLogin.c mainMenu.c createEmployeeAccount.c _file_information.h; do cp "$file.bak" "$file" done # remove backups for file in employeeLogin.c.bak mainMenu.c.bak createEmployeeAccount.c.bak _file_information.h.bak; do rm "$file" done cd ..