2 # - arguments will be exported to env
3 # - must called from within the repo root
5 export REPO
=$
(basename $
(pwd) .git
)
7 if test $
(uname
) = "Linux"
11 MKTEMP
="mktemp -t repo-template"
20 for FILE
in $
(ls -a $
(dirname -- $0)/presets
)
22 SRCFILE
=$
(dirname -- $0)/presets
/$FILE
28 test "${COMPOSER+set}" = "" && continue
30 php
-d variables_order
=E $
(dirname -- $0)/presets
/composer.json
>$SRCFILE
32 package.xml|CREDITS|config.
*|Makefile.frag
)
33 test "${PECL+set}" = "" && continue
35 php
-d variables_order
=E $
(dirname -- $0)/presets
/$FILE >$SRCFILE
39 php
-d variables_order
=E $
(dirname -- $0)/presets
/$FILE >$SRCFILE
42 test "${MDREF+set}" = "" && continue
44 php
-d variables_order
=E $
(dirname -- $0)/presets
/$FILE >$SRCFILE
53 DIFF
="diff -udbBE -- $SRCFILE $FILE"
56 while read -n 1 -p "File $FILE exists and differs (q,s,r,d,v,?) " ACTION
64 cp -fv -- $SRCFILE $FILE
71 vimdiff
-- $SRCFILE $FILE
77 echo "Select what to do now:"
78 echo " (q)uit and exit program now"
79 echo " (s)kip this file an keep the existing"
80 echo " (r)eplace the existing file with the preset"
81 echo " (d)iff the two files -udbBE"
82 echo " (v)imdiff the two files"