diff options
author | Jonathan Bauer | 2014-01-21 15:00:44 +0100 |
---|---|---|
committer | Jonathan Bauer | 2014-01-21 15:00:44 +0100 |
commit | e5f32bab510f05fa3f68edb1db84718dc09eaca9 (patch) | |
tree | c27a4f01899a17fcf4c5a21eb900197b059c7709 /remote/setup_target | |
parent | Merge branch 'master' of simonslx:openslx-ng/tm-scripts (diff) | |
download | tm-scripts-e5f32bab510f05fa3f68edb1db84718dc09eaca9.tar.gz tm-scripts-e5f32bab510f05fa3f68edb1db84718dc09eaca9.tar.xz tm-scripts-e5f32bab510f05fa3f68edb1db84718dc09eaca9.zip |
[remote/setup_target] only export remote/builds to /export/build if it
is not already mounted.
Diffstat (limited to 'remote/setup_target')
-rwxr-xr-x | remote/setup_target | 4 |
1 files changed, 4 insertions, 0 deletions
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}" |