This commit is contained in:
chonghe
2023-09-15 20:02:05 +08:00
parent 0c1ad4008d
commit 9091ebdd4c

View File

@@ -57,10 +57,12 @@ new_files=($general $bn $vc $am)
exist=() exist=()
changes=() changes=()
diff=()
check() { check() {
if [[ -f $1 ]]; # check for existence of file if [[ -f $1 ]]; # check for existence of file
then then
diff=$(diff $1 $2) diff=$(diff $1 $2)
diff+=($diff)
exist+=(false) exist+=(false)
else else
cp $2 ./book/src cp $2 ./book/src
@@ -91,7 +93,7 @@ rm -f help_general.md help_bn.md help_vc.md help_am.md
echo "exist = ${exist[@]}" echo "exist = ${exist[@]}"
echo "changes = ${changes[@]}" echo "changes = ${changes[@]}"
echo "$diff" echo "difference = ${diff[@]}"
if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]]; if [[ ${exist[@]} == *"true"* && ${update[@]} == *"true"* ]];
then then