git://git.onelab.eu
/
infrastructure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
turn off f24 build
[infrastructure.git]
/
scripts
/
all-modules.sh
diff --git
a/scripts/all-modules.sh
b/scripts/all-modules.sh
index
b33276e
..
77259b2
100755
(executable)
--- a/
scripts/all-modules.sh
+++ b/
scripts/all-modules.sh
@@
-1,5
+1,9
@@
#!/bin/bash
#!/bin/bash
+# feb 2013 - mainline is now known as 5.2, remove that step in the output
+# meaning results are now in merely
+# http://build.onelab.eu/modules/version.html
+#
# reviewed in dec. 2010
# moving back to running on the EU side
#
# reviewed in dec. 2010
# moving back to running on the EU side
#
@@
-15,6
+19,7
@@
COMMAND=$(basename $0)
# running as root on liquid
OUTPUT=/build/modules
# running as root on liquid
OUTPUT=/build/modules
+WWWNAME=mainline
LOCK=~/all-modules.run
# make sure the cyclic tasks do not interfere with manual usage
# (i.e. do not use ~/modules)
LOCK=~/all-modules.run
# make sure the cyclic tasks do not interfere with manual usage
# (i.e. do not use ~/modules)
@@
-39,33
+44,31
@@
function do_update() {
fi
}
fi
}
-# usage: do_version dir workdir
wwwname
+# usage: do_version dir workdir
function do_version () {
build_dir=$1; shift
workdir=$1; shift
function do_version () {
build_dir=$1; shift
workdir=$1; shift
- wwwname=$1; shift
- out_dir=$OUTPUT
/$wwwname
+ out_dir=$OUTPUT
out_file=$out_dir/version.html
out_tmp=$out_dir/.version.html
mkdir -p $out_dir
out_file=$out_dir/version.html
out_tmp=$out_dir/.version.html
mkdir -p $out_dir
- $build_dir/module-version $VERBOSE -w $workdir --www $
wwwname
-a &> $out_tmp
+ $build_dir/module-version $VERBOSE -w $workdir --www $
WWWNAME
-a &> $out_tmp
mv -f $out_tmp $out_file
}
mv -f $out_tmp $out_file
}
-# usage: do_
version dir workdir wwwname
+# usage: do_
diff dir workdir
function do_diff () {
build_dir=$1; shift
workdir=$1; shift
function do_diff () {
build_dir=$1; shift
workdir=$1; shift
- wwwname=$1; shift
- out_dir=$OUTPUT
/$wwwname
+ out_dir=$OUTPUT
out_file=$out_dir/diff.html
out_tmp=$out_dir/.diff.html
mkdir -p $out_dir
out_file=$out_dir/diff.html
out_tmp=$out_dir/.diff.html
mkdir -p $out_dir
- $build_dir/module-diff $VERBOSE -w $workdir --www $
wwwname
-a &> $out_tmp
+ $build_dir/module-diff $VERBOSE -w $workdir --www $
WWWNAME
-a &> $out_tmp
mv -f $out_tmp $out_file
}
mv -f $out_tmp $out_file
}
@@
-86,13
+89,22
@@
function main () {
shift
done
shift
done
+ # is the stamp older than 2 hours ?
+ # in minutes
+ GRACE=120
+ is_old=$(find $LOCK -mmin +$GRACE 2> /dev/null)
+ if [ -n "$is_old" ] ; then
+ echo "$LOCK is older than $GRACE minutes - removing"
+ rm -f $LOCK
+ fi
+
[ -f $LOCK ] && exit 1
echo $$ > $LOCK
do_update ~/git-build
[ -f $LOCK ] && exit 1
echo $$ > $LOCK
do_update ~/git-build
- do_version ~/git-build $WORKDIR_GIT
5.0
- do_diff ~/git-build $WORKDIR_GIT
5.0
+ do_version ~/git-build $WORKDIR_GIT
+ do_diff ~/git-build $WORKDIR_GIT
rm $LOCK
rm $LOCK