X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess%2Fupdate.sh;h=bec40eacca5f653b0ac81b954050cb62ecffe0a5;hp=a60ca80466f8c15a901d2dc1656e56e2836af268;hb=707e794d26062516eb4188d1cd2902929613c46b;hpb=e0c24aed084b96f3c5800d869bc759f89667bd6a diff --git a/qchess/update.sh b/qchess/update.sh old mode 100755 new mode 100644 index a60ca80..bec40ea --- a/qchess/update.sh +++ b/qchess/update.sh @@ -2,10 +2,14 @@ # I still can't believe I am doing this -# (This can't be done with gnu make, because of circular dependency issues) +# This updates the component files from the target, as well as the target from the components +# You can't do that with gnu make, because of the circular dependency +# But this should probably not be used by any sane person + +exit 1 target=qchess.py -components="piece.py board.py player.py thread_util.py game.py graphics.py main.py" +components="piece.py board.py player.py network.py thread_util.py game.py graphics.py main.py" # The below seems nicer, but doesn't work because things need to be imported in the right order :( #components=$(ls *.py | tr '\t' '\n' | grep -v $target) @@ -20,7 +24,8 @@ target_mod=$(stat -c %Y $target 2>/dev/null) if [ $? -ne 0 ]; then merge_required=true else - merge_required=false + merge_required=true + for f in $components; do @@ -49,6 +54,8 @@ else merge_required=true fi done + + fi # If any components were modified more recently than the target, merge the components into the target