Some of them are no longer useful; drop them. For the rest, have useful usage messages. And also be a little more principled in where we introduce CFLAGS, and where we expect it to come in from the commandline. I'm choosing not to call gen/run/dgen/drun from test_layers because it makes test_layers harder for newcomers to read. The scripts aren't the first thing people should see, they're just useful once you're up and running hacking on SubX.
24 lines
535 B
Bash
Executable File
24 lines
535 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
# Helper to more conveniently open commonly-used SubX programs.
|
|
|
|
if [ $# -eq 0 ]
|
|
then
|
|
echo "Usage: $0 <file root without subdirectory or .subx extension>"
|
|
echo
|
|
echo "Naming convention: Files starting with 'ex' will be assumed to live in examples/"
|
|
echo "Other files will be assumed to live in apps/"
|
|
exit 1
|
|
fi
|
|
|
|
if [[ $EDITOR == *'vim'* ]]
|
|
then
|
|
LOCAL_SETTINGS='-S vimrc.vim'
|
|
fi
|
|
|
|
if [[ $1 == 'ex'* ]]
|
|
then
|
|
eval $EDITOR $LOCAL_SETTINGS examples/$1.subx
|
|
else
|
|
eval $EDITOR $LOCAL_SETTINGS apps/$1.subx
|
|
fi
|