File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change 4141# A couple of the config files are referenced from other subscripts, so they
4242# get vars, while multiple subscripts call ensure_file_from_example.
4343function ensure_file_from_example {
44- if [[ -f " $1 " ]]; then
45- echo " $1 already exists, skipped creation."
44+ target=" $1 "
45+ if [[ -f " $target " ]]; then
46+ echo " $target already exists, skipped creation."
4647 else
47- echo " Creating $1 ..."
48- cp -n $( echo " $1 " | sed ' s/\.[^.]*$/.example&/' ) " $1 "
4948 # sed from https://stackoverflow.com/a/25123013/90297
49+ example=" $( echo " $target " | sed ' s/\.[^.]*$/.example&/' ) "
50+ if [[ ! -f " $example " ]]; then
51+ echo " Oops! Where did $example go? 🤨 We need it in order to create $target ."
52+ exit
53+ fi
54+ echo " Creating $target ..."
55+ cp -n " $example " " $target "
5056 fi
5157}
5258SENTRY_CONFIG_PY=' ../sentry/sentry.conf.py'
You can’t perform that action at this time.
0 commit comments