x49gp/newconfig
2017-03-27 17:02:05 -06:00

18 lines
290 B
Bash
Executable file

#!/bin/bash
if [ ! -r "config.tmpl" ]
then
echo "Cannot read config.tmpl" >&2
exit 1
fi
B=${PWD##$HOME/}
perl -p -e "s!^(basename=).*!\1$B!" <config.tmpl >config
if [ "$(uname -s)" = "Linux" ]
then
perl -p -e "s!^(filename=sdcard).dmg!\1!" config
fi
echo "New config created"
exit 0