[Dehs-devel] r67 - trunk
atomo64-guest at alioth.debian.org
atomo64-guest at alioth.debian.org
Sun Dec 9 16:11:16 UTC 2007
Author: atomo64-guest
Date: 2007-12-09 16:11:15 +0000 (Sun, 09 Dec 2007)
New Revision: 67
Modified:
trunk/dehs.sh
trunk/dehs_pg.php
Log:
dehs.sh: fixed PID check
dehs_pg.php: added bz2 to the list of file extensions to be matched when searching for a base url for the wwiz
Modified: trunk/dehs.sh
===================================================================
--- trunk/dehs.sh 2007-12-09 02:03:33 UTC (rev 66)
+++ trunk/dehs.sh 2007-12-09 16:11:15 UTC (rev 67)
@@ -6,9 +6,11 @@
export BASEDIR=/org/home/groups/dehs
export WORKDIR=$BASEDIR/dehs_prj/dehs
LOCK=$BASEDIR/run.lock
+BNAME="`basename $0`"
if [ -e $LOCK ]; then
- if [ -z "ps -p $(cat $LOCK) | grep $0" ]; then
+ PID="`cat $LOCK`"
+ if [ ! -n "$PID" ] || ! $(kill -0 "$PID" 2> /dev/null) || ! "`ps -p "$PID" | grep "$BNAME" &>/dev/null`"; then
# remove stale lock
rm $LOCK
else
Modified: trunk/dehs_pg.php
===================================================================
--- trunk/dehs_pg.php 2007-12-09 02:03:33 UTC (rev 66)
+++ trunk/dehs_pg.php 2007-12-09 16:11:15 UTC (rev 67)
@@ -704,7 +704,7 @@
}
- if (preg_match ('#((ftp://|http://|https://)\S+(html|htm|/(?(?=.+(tar|tgz|zip|gz))|[^>\s\)\a]+)))#i',$contents,$matches)) {
+ if (preg_match ('#((ftp://|http://|https://)\S+(html|htm|/(?(?=.+(tar|tgz|zip|gz|bz2))|[^>\s\)\a]+)))#i',$contents,$matches)) {
$final=substr($matches[1],-1);
if ($final=='.') {
$matches[1]=substr($matches[1],0,-1);
@@ -718,7 +718,7 @@
$generatedWatches[]=array('url' => preg_replace("#((http|https|ftp)://.+):(.*)#i",'$1' . '$3', $matches[1],1), 'space' => $space);
}
- if (preg_match ('#((ftp|http)\.\S+(html|htm|/(?(?=.+(tar|tgz|zip|gz))|[^>\s\)\a]+)))#i',$contents,$matches)) {
+ if (preg_match ('#((ftp|http)\.\S+(html|htm|/(?(?=.+(tar|tgz|zip|gz|bz2))|[^>\s\)\a]+)))#i',$contents,$matches)) {
$final=substr($matches[1],-1);
if ($final=='.') {
$matches[1]=substr($matches[1],0,-1);
More information about the Dehs-devel
mailing list