[Lunar-commits] CVS: theedge/var/lib/lunar/functions build.lunar,
1.24, 1.25 connect.lunar, 1.5, 1.6 download.lunar, 1.47,
1.48 messages.lunar, 1.18, 1.19 moonbase.lunar, 1.18,
1.19 queue.lunar, 1.6, 1.7 temp.lunar, 1.6, 1.7
Auke Kok
sofar at lunar-linux.org
Fri Dec 10 10:46:36 UTC 2004
Update of /var/cvs/lunar/theedge/var/lib/lunar/functions
In directory espresso.foo-projects.org:/home/sofar/active/theedge/var/lib/lunar/functions
Modified Files:
build.lunar connect.lunar download.lunar messages.lunar
moonbase.lunar queue.lunar temp.lunar
Log Message:
define TMPDIR and use it globally. Its position is overwriteable by using lunar set TMPDIR
Index: build.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/build.lunar,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- build.lunar 8 Dec 2004 08:35:46 -0000 1.24
+++ build.lunar 10 Dec 2004 10:46:33 -0000 1.25
@@ -291,7 +291,7 @@
if ! grep -q "$DEST" "$1"
then echo -n "$ITEM\|"
- echo "$ITEM" >> /tmp/$MODULE.rejected.symlinks
+ echo "$ITEM" >> $TMPDIR/$MODULE.rejected.symlinks
fi
fi
Index: connect.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/connect.lunar,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- connect.lunar 28 Dec 2003 14:35:41 -0000 1.5
+++ connect.lunar 10 Dec 2004 10:46:33 -0000 1.6
@@ -61,17 +61,17 @@
then return
fi
- rm -f /tmp/disconnect
- cat << EOF > /tmp/disconnect
+ rm -f $TMPDIR/disconnect
+ cat << EOF > $TMPDIR/disconnect
#!/bin/sh
while ps -A | grep -q "lget"; do sleep 120; done
poff
-rm -f /tmp/disconnect
+rm -f $TMPDIR/disconnect
EOF
-chmod a+x /tmp/disconnect
- /tmp/disconnect &
+chmod a+x $TMPDIR/disconnect
+ $TMPDIR/disconnect &
}
Index: download.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/download.lunar,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- download.lunar 7 Dec 2004 14:11:01 -0000 1.47
+++ download.lunar 10 Dec 2004 10:46:33 -0000 1.48
@@ -51,8 +51,8 @@
message "${MESSAGE_COLOR}Downloading SVN module for" \
"module ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- mk_source_dir /tmp/$MODULE-$VERSION
- cd /tmp/$MODULE-$VERSION
+ mk_source_dir $TMPDIR/$MODULE-$VERSION
+ cd $TMPDIR/$MODULE-$VERSION
if [ -f "$2" ] ; then
verbose_msg "Extracting local SVN copy"
@@ -61,8 +61,8 @@
if ! tar xjf $2 ; then
message "${PROBLEM_COLOR}Warning: bad local SVN copy, checking out fresh SVN copy${DEFAULT_COLOR}"
- rm_source_dir /tmp/$MODULE-$VERSION
- mk_source_dir /tmp/$MODULE-$VERSION
+ rm_source_dir $TMPDIR/$MODULE-$VERSION
+ mk_source_dir $TMPDIR/$MODULE-$VERSION
fi
cd $CD
fi
@@ -98,8 +98,8 @@
activity_log "lget" "$MODULE" "$VERSION" "failed" "Could not get $1"
fi
- cd /tmp
- rm_source_dir /tmp/$MODULE-$VERSION
+ cd $TMPDIR
+ rm_source_dir $TMPDIR/$MODULE-$VERSION
}
@@ -130,8 +130,8 @@
"${FILE_COLOR}${CVSMODULE}${DEFAULT_COLOR}${MESSAGE_COLOR}" \
"for module ${MODULE_COLOR}${MODULE}${DEFAULT_COLOR}"
- mk_source_dir /tmp/$MODULE-$VERSION
- cd /tmp/$MODULE-$VERSION
+ mk_source_dir $TMPDIR/$MODULE-$VERSION
+ cd $TMPDIR/$MODULE-$VERSION
if [ -f "$2" ] ; then
verbose_msg "Extracting local CVS copy"
@@ -144,11 +144,11 @@
if ! tar xjf $2 ; then
message "${PROBLEM_COLOR}Warning: bad local CVS copy, checking out fresh CVS copy${DEFAULT_COLOR}"
- rm_source_dir /tmp/$MODULE-$VERSION
- mk_source_dir /tmp/$MODULE-$VERSION
- cd /tmp/$MODULE-$VERSION
+ rm_source_dir $TMPDIR/$MODULE-$VERSION
+ mk_source_dir $TMPDIR/$MODULE-$VERSION
+ cd $TMPDIR/$MODULE-$VERSION
else
- cd /tmp/$MODULE-$VERSION/$CVSMODULE
+ cd $TMPDIR/$MODULE-$VERSION/$CVSMODULE
fi
fi
@@ -178,15 +178,15 @@
if [ "$GOT_CVS" == "yes" ] ; then
message "${MESSAGE_COLOR}Creating ${FILE_COLOR}${2}${DEFAULT_COLOR}"
# pack in last component dir of $CVSMODULE
- cd /tmp/$MODULE-$VERSION/$(dirname $CVSMODULE)
+ cd $TMPDIR/$MODULE-$VERSION/$(dirname $CVSMODULE)
tar cjf $2 $(basename $CVSMODULE)
cd $CD
else
activity_log "lget" "$MODULE" "$VERSION" "failed" "Could not get $CVSMODULE"
fi
- cd /tmp
- rm_source_dir /tmp/$MODULE-$VERSION
+ cd $TMPDIR
+ rm_source_dir $TMPDIR/$MODULE-$VERSION
}
@@ -209,7 +209,7 @@
debug_msg "fuzzy_wget ($@)"
# this is what the download will be stored as initially:
- TMP_FILE=/tmp/$(basename $2)
+ TMP_FILE=$TMPDIR/$(basename $2)
if [ "$FTP_ACTIVE" == "off" -o "$FTP_PASSIVE" == "on" ] ; then
WGET_FTP_CONNECTION="--passive-ftp"
@@ -272,7 +272,7 @@
#
get_url() {
(
- cd /tmp
+ cd $TMPDIR
debug_msg "get_url ($@)"
if [ -n "$1" ] ; then
if [ "${1:0:6}" == "cvs://" ] ; then
Index: messages.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/messages.lunar,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- messages.lunar 4 Nov 2004 09:31:57 -0000 1.18
+++ messages.lunar 10 Dec 2004 10:46:33 -0000 1.19
@@ -54,13 +54,13 @@
if [ -n "$LUNAR_DEBUG" ] ; then
echo "++ $@" > /dev/stderr
if [ "$LUNAR_DEBUG" -ge "2" ] ; then
- echo "++ $@" >> /tmp/lp_debuglog.$$
- if [ -f /tmp/l_debug_var.$$ ] ; then
- mv /tmp/l_debug_var.$$ /tmp/l_debug_var.$$.old
+ echo "++ $@" >> $TMPDIR/lp_debuglog.$$
+ if [ -f $TMPDIR/l_debug_var.$$ ] ; then
+ mv $TMPDIR/l_debug_var.$$ $TMPDIR/l_debug_var.$$.old
fi
- set | grep '^[A-Z]' | sed 's/^/VAR /' > /tmp/l_debug_var.$$
- diff -U0 /tmp/l_debug_var.$$.old /tmp/l_debug_var.$$ | \
- grep -v "^@@" | grep "VAR" | tee -a /tmp/lp_debuglog.$$ > /dev/stderr
+ set | grep '^[A-Z]' | sed 's/^/VAR /' > $TMPDIR/l_debug_var.$$
+ diff -U0 $TMPDIR/l_debug_var.$$.old $TMPDIR/l_debug_var.$$ | \
+ grep -v "^@@" | grep "VAR" | tee -a $TMPDIR/lp_debuglog.$$ > /dev/stderr
fi
fi
}
Index: moonbase.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/moonbase.lunar,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- moonbase.lunar 29 Oct 2004 14:17:52 -0000 1.18
+++ moonbase.lunar 10 Dec 2004 10:46:33 -0000 1.19
@@ -33,7 +33,7 @@
# make sure we set these values up front to be sure
run_details
- rm -f /tmp/$SOURCE
+ rm -f $TMPDIR/$SOURCE
if [ ! -d "$SYSTEM_MOONBASE" ] ; then
mkdir -p $SYSTEM_MOONBASE
Index: queue.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/queue.lunar,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- queue.lunar 21 May 2004 10:27:13 -0000 1.6
+++ queue.lunar 10 Dec 2004 10:46:34 -0000 1.7
@@ -52,7 +52,7 @@
if [ -n "$2" ];
then
- TMP_QUEUE="/tmp/lunar_remove_queue.$$"
+ TMP_QUEUE="$TMPDIR/lunar_remove_queue.$$"
rm -f $TMP_QUEUE 2>/dev/null
lock_file $1 &&
cat $1 | grep -v "^"$2"\$" > $TMP_QUEUE
Index: temp.lunar
===================================================================
RCS file: /var/cvs/lunar/theedge/var/lib/lunar/functions/temp.lunar,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- temp.lunar 1 Oct 2003 16:28:46 -0000 1.6
+++ temp.lunar 10 Dec 2004 10:46:34 -0000 1.7
@@ -19,7 +19,6 @@
temp_create() {
debug_msg "temp_create ($@)"
- TMPDIR=${TMPDIR:-/var/tmp}
mod_v_safe_edit $1
TMPFILE=$MOD_V_SNAME
if TMPFILE=$(mktemp -p "$TMPDIR" -t lunar.`basename $0`.$$.$TMPFILE.XXXXXXXXXX ) ; then
More information about the Lunar-commits
mailing list