From e5f32bab510f05fa3f68edb1db84718dc09eaca9 Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Tue, 21 Jan 2014 15:00:44 +0100 Subject: [remote/setup_target] only export remote/builds to /export/build if it is not already mounted. --- remote/setup_target | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'remote') diff --git a/remote/setup_target b/remote/setup_target index 5fc68a4f..11a8ffbb 100755 --- a/remote/setup_target +++ b/remote/setup_target @@ -120,6 +120,10 @@ read_build () { export_builds() { [ ! -d "${MODE_DIR}/builds" ] && perror "No ${MODE_DIR}/builds, nothing to export." + if mount|grep -q tm-scripts/remote/builds; then + pwarning "${MODE_DIR}/builds already exported! Ignoring..." + return 1; + fi pinfo "Mounting ${MODE_DIR}/builds to ${EXPORT_DIR}. This will make the local builds syncable from another machine." [ ! -d "${EXPORT_DIR}" ] && mkdir -p "${EXPORT_DIR}" mount --bind ${MODE_DIR}/builds ${EXPORT_DIR} || perror "Failed to bind mount ${MODE_DIR}/builds to ${EXPORT_DIR}" -- cgit v1.2.3-55-g7522