|
|
@ -36,11 +36,13 @@ if ! [ -d "$COMPONENT_NAME" ]; then |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
|
|
|
|
if [ -e "$COMPONENT_NAME.locked" ]; then |
|
|
|
lock=$DOCKER_UPDATE_PATH/$COMPONENT_NAME.lock |
|
|
|
if [ -e "$lock" ]; then |
|
|
|
echo "Master is being updated." |
|
|
|
echo "Or '$COMPONENT_NAME.locked' file was left dangling over." |
|
|
|
echo "Or '$lock' file was left dangling over." |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
touch "$lock" |
|
|
|
|
|
|
|
|
|
|
|
clean_all() { |
|
|
@ -54,7 +56,6 @@ tmpdir="$DOCKER_UPDATE_PATH"/tmp |
|
|
|
mkdir -p "$tmpdir" |
|
|
|
tmpdir_changes=$(mktemp -d $tmpdir/$COMPONENT_NAME.changes.XXXXXX) |
|
|
|
tmpdir_root=$(mktemp -d $tmpdir/$COMPONENT_NAME.root.XXXXXX) |
|
|
|
|
|
|
|
trap "clean_all" EXIT |
|
|
|
mount -t aufs -o br=$tmpdir_changes:$DOCKER_UPDATE_PATH/$COMPONENT_NAME -o udba=none none "$tmpdir_root" |
|
|
|
cd "$tmpdir_root" |