Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/6258

Submitted by:   dluke@
Reviewed by:    jmpp@

The script now uses a lock file to check for an already running indexing.

git-svn-id: https://svn.macports.org/repository/macports/trunk/base@15631 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
jmpalacios committed Dec 29, 2005
1 parent 273d644 commit 246696d682730c1829b55e97dd6f69277967d784
Showing with 10 additions and 1 deletion.
  1. +10 −1 portmgr/IndexRegen.sh
@@ -5,10 +5,11 @@
# Created by Juan Manuel Palacios,
# e-mail: jmpp@opendarwin.org
# Updated by Paul Guyot, <pguyot@kallisys.net>
# $Id: IndexRegen.sh,v 1.1 2005/12/06 20:47:42 jmpp Exp $
# $Id: IndexRegen.sh,v 1.2 2005/12/29 16:43:03 jmpp Exp $
####

# Configuration
LOCKFILE=/tmp/.dp_index_regen.lock
# ROOT directory, where everything is. This must exist.
ROOT=/Users/pguyot/dp-portindex
# SSH key. This must exist.
@@ -47,6 +48,13 @@ COMMIT_MSG=${ROOT}/commit.msg
# The date.
DATE=$(date +'%A %Y-%m-%d at %H:%M:%S')

if [ ! -e $LOCKFILE ]; then
touch $LOCKFILE
else
echo "Index Regen lockfile found, is another index regen running?"
exit 1
fi

# Create the SSH wrapper if it doesn't exist (comment this for -d /Volumes...)
if [ ! -e $SSH_KEY ]; then
echo "Key doesn't exist. The script is configured to find the SSH key at:"
@@ -140,3 +148,4 @@ else
rm -f $COMMIT_MSG $FAILURE_LOG
fi

rm -f $LOCKFILE

0 comments on commit 246696d

Please sign in to comment.
You can’t perform that action at this time.