32 lines
436 B
Bash
Executable File
32 lines
436 B
Bash
Executable File
#!/bin/bash
|
|
#set -x
|
|
|
|
lesson=$1
|
|
echo Processing $lesson
|
|
|
|
if [ ! -d "${lesson}" ]
|
|
then echo "Invalid lesson."
|
|
exit 1
|
|
fi
|
|
|
|
|
|
rm -rf 5_work 9_goal
|
|
mkdir 5_work
|
|
|
|
cd 5_work
|
|
cp -ar "../${lesson}/0_repository" .repository1
|
|
git init
|
|
git remote add origin .repository1/
|
|
git fetch
|
|
git switch master
|
|
cd ..
|
|
cp -ar "${lesson}/1_overlay/"* 5_work
|
|
cd -
|
|
"../${lesson}/3_workprep.sh"
|
|
cd ..
|
|
|
|
|
|
cp -ar 5_work 9_goal
|
|
cd 9_goal
|
|
"../${lesson}/5_solution.sh"
|