diff options
Diffstat (limited to 'dscip')
-rwxr-xr-x | dscip | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dscip b/dscip index c35ae3b..9621800 100755 --- a/dscip +++ b/dscip @@ -27,7 +27,7 @@ DSCIP_GITREPO="https://www.example.com/example/example.git" DSCIP_GITMODE="clone" # Branch to check # DSCIP_BRANCH="master" -WORKING_DIRECTORY="/tmp/example" +WORKING_DIRECTORY="." # Commands to run before building. # DSCIP_PRE_CMD="$WORKING_DIRECTORY/pre.sh" # Commands to run to build program. # @@ -47,7 +47,8 @@ DSCIP_DISREGARD_COMMIT_CHECK="false" # If the script should just rebuild even # # Check if script is currently running, and if not, reset LOCK # if [ -f $WORKING_DIRECTORY/LOCK ]; then LOCKED_PID=$(cat $WORKING_DIRECTORY/LOCK) - if ps -p $LOCKED_PID; then + if ps -U $USER -p "$LOCKED_PID"; then + echo "Script still running. Exiting..." exit 0 else rm $WORKING_DIRECTORY/LOCK |