#!/bin/bash if [[ -z "$branch" ]]; then echo "Please specify the branch you want to checkout to" exit; fi modules=('Cancer' 'Pharmacy' 'Payroll' 'PatientFinance' 'PatientDiscounts' 'Maternity' 'Journals' 'Invoices' 'Investigations' 'Insurance' 'Hiv' 'FinanceReports' 'Finance' 'EyeClinic' 'Expenses' 'Diabetes' 'Budgets' 'Banking' 'Antenatal' 'Stores' 'Theatre' 'Reports' 'WardManagement') for module in "${modules[@]}"; do echo "Status: ${module}" cd Modules/"$module" || continue git checkout "$branch" cd ../../ done git checkout "$branch"