mirror of
https://github.com/Yannick7777/codeigniter-setup-script.git
synced 2025-06-26 06:05:22 +02:00
22 lines
353 B
Bash
Executable file
22 lines
353 B
Bash
Executable file
#!/bin/bash
|
|
|
|
if [[ "$(basename $(pwd))" == "igniter" ]]; then
|
|
cd ..
|
|
./switch-branch-migrate "$@"
|
|
cd igniter
|
|
exit
|
|
fi
|
|
|
|
branch_name=$1
|
|
|
|
cd igniter
|
|
|
|
if git show-ref --verify --quiet refs/heads/"$branch_name"; then
|
|
git checkout "$branch_name"
|
|
else
|
|
git checkout -b "$branch_name"
|
|
fi
|
|
|
|
cd ..
|
|
|
|
docker compose exec app php spark # migrate
|