mirror of
https://github.com/gwenhael-le-moine/x49gp.git
synced 2024-12-27 21:58:33 +01:00
19 lines
292 B
Text
19 lines
292 B
Text
|
#!/bin/bash
|
||
|
|
||
|
if [ ! -r "config.tmpl" ]
|
||
|
then
|
||
|
echo "Cannot read config.tmpl" >&2
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
B=${PWD##$HOME/}
|
||
|
perl -pi -e "s!^(basename=).*!\1$B!" <config.tmpl >config
|
||
|
|
||
|
if [ "$(uname -s)" = "Linux" ]
|
||
|
then
|
||
|
perl -pi -e "s!^(filename=sdcard).dmg!\1!" config
|
||
|
fi
|
||
|
|
||
|
echo "New config created"
|
||
|
exit 0
|