Skip to content

Commit

Permalink
Merge pull request #361 from simaishi/fix_stop_on_existing_build
Browse files Browse the repository at this point in the history
Change how to identify running build
  • Loading branch information
Fryguy committed Oct 17, 2019
2 parents 3ee9071 + ca2fb66 commit cb526e3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bin/shared_functions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

stop_on_existing_build ()
stop_on_existing_imagefactory_build ()
{
CUR_BUILD="`virsh list | sed '1,2d'`"
if [ -n "${CUR_BUILD}" ]
Expand All @@ -9,3 +9,11 @@ stop_on_existing_build ()
exit 1
fi
}

stop_on_existing_build ()
{
if [ "`pgrep -fa ${BUILD_DIR}\/.*/vmbuild.rb`" ]; then
echo "vmbuild.rb running from the current directory, cannot kick-off build"
exit 1
fi
}

0 comments on commit cb526e3

Please sign in to comment.