forked from FOSS/BangleApps
tell git to ignore modified `apps.json` when running create_apps.json.sh
Only if no arguments given: `create_apps_json.sh apps.json` will leave it alone if someone really wants to overwrite+commit apps.json.master
parent
e75a828fce
commit
46fbccf711
|
@ -36,3 +36,13 @@ for app in apps/*/; do
|
|||
fi
|
||||
done
|
||||
echo "]" >> "$outfile"
|
||||
|
||||
if [ -z "$1"]; then
|
||||
# Running with no arguments: prevent accidental commit of modified apps.json.
|
||||
# You can use `create_apps.json.sh apps.json` if you really want to both
|
||||
# overwrite and still commit apps.json
|
||||
git update-index --skip-worktree apps.json
|
||||
echo "Told git to ignore modified apps.json."
|
||||
# If you want to unignore it, use
|
||||
# 'git update-index --no-skip-worktree apps.json'
|
||||
fi
|
Loading…
Reference in New Issue