summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-06-24 12:05:34 +0200
committerLucio Andrés Illanes Albornoz (arab, vxp) <l.illanes@gmx.de>2016-06-24 12:05:34 +0200
commitcb0470e40d4d12330973cfad4150cbef8076edd1 (patch)
treebf4238a64305346626fee2dd31639bc444dd028f
parent8defff11e8b9ab6fd7506204a46a85f0f412a3fe (diff)
downloadmidipix_build-cb0470e40d4d12330973cfad4150cbef8076edd1.tar.bz2
midipix_build-cb0470e40d4d12330973cfad4150cbef8076edd1.tar.xz
build.sh -i: refuse to overwrite build script w/ identical filename.
Followup to <3243be768ad8a601b2636be4dd23dbb6c2d7dd9b>.
-rw-r--r--build.subr3
1 files changed, 2 insertions, 1 deletions
diff --git a/build.subr b/build.subr
index 7858378b..f44b5be7 100644
--- a/build.subr
+++ b/build.subr
@@ -89,7 +89,8 @@ insert_build_script_link() {
|| ! isnumber ${_ibsl_level} \
|| [ ${#_ibsl_level} != 3 ]; then
log_msg failexit "Error: invalid or empty build script filename/level/name.";
- return 1;
+ elif [ -e ${_ibsl_fname} ]; then
+ log_msg failexit "Error: build script \`${_ibsl_fname}' already exists.";
elif [ -z "$(find -maxdepth 1 -name ${_ibsl_level}.\* -printf '%P\n' -quit)" ]; then
echo ln -s pkg.build ${_ibsl_fname};
ln -s pkg.build ${_ibsl_fname};