From cb0470e40d4d12330973cfad4150cbef8076edd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lucio=20Andr=C3=A9s=20Illanes=20Albornoz=20=28arab=2C=20vx?= =?UTF-8?q?p=29?= Date: Fri, 24 Jun 2016 12:05:34 +0200 Subject: build.sh -i: refuse to overwrite build script w/ identical filename. Followup to <3243be768ad8a601b2636be4dd23dbb6c2d7dd9b>. --- build.subr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}; -- cgit v1.2.3