MEDLEY-UILS loadup-db run-medley fixes (#808)
* MEDLEY-UILS loadup-db run-medley fixes * UNIXCOMM compile to DFASL; only set UTF-8 if getenv(LANG). loadup-db no lisp.virtualmem
This commit is contained in:
@@ -7,6 +7,13 @@ if [ ! -x run-medley ] ; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cp -p tmp/full.sysout tmp/lisp.sysout tmp/*.dribble tmp/whereis.hash loadups/
|
||||
cp -p tmp/exports.all tmp/RDSYS tmp/RDSYS.LCOM library/
|
||||
# was
|
||||
# cp -p tmp/full.sysout tmp/lisp.sysout tmp/*.dribble tmp/whereis.hash loadups/
|
||||
# cp -p tmp/exports.all tmp/RDSYS tmp/RDSYS.LCOM library/
|
||||
# just copy the files that are released
|
||||
|
||||
./scripts/cpv tmp/full.sysout loadups
|
||||
./scripts/cpv tmp/lisp.sysout loadups
|
||||
./scripts/cpv tmp/whereis.hash loadups
|
||||
./scripts/cpv tmp/exports.all library
|
||||
|
||||
|
||||
61
scripts/cpv
Executable file
61
scripts/cpv
Executable file
@@ -0,0 +1,61 @@
|
||||
#!/bin/sh
|
||||
|
||||
# cpv file dest
|
||||
# could extend with -r or copying multiple files
|
||||
# could change from cp to ln
|
||||
|
||||
file="$1"
|
||||
dest="$2"
|
||||
|
||||
|
||||
if [ ! -f "$file" ]; then
|
||||
echo no such file "$file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if dest is a directory, add the source file name
|
||||
if [ -d "$dest" ]; then
|
||||
dest=$dest/`basename $file`
|
||||
fi
|
||||
|
||||
# if no such file $dest then just copy
|
||||
if [ ! -f "$dest" ]; then
|
||||
ln $file $dest #WAS cp -p $file $dest
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# find maximum version of dest
|
||||
max=0
|
||||
for vf in "$dest".~[1-9]*~
|
||||
do vn=`echo $vf | sed -e 's/^.*\.~\([1-9][0-9]*\)~$/\1/'`
|
||||
if [ -f $dest.~$vn~ ]; then
|
||||
if [ $max -lt $vn ]; then
|
||||
max=$vn
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ $max -eq 0 ]; then # no current versions
|
||||
mv $dest $dest.~1~ # change version to version 1
|
||||
new=2
|
||||
else
|
||||
if cmp -q $dest $dest.~$max~ >/dev/null 2>&1
|
||||
then # they're different
|
||||
max=`expr $max + 1` # make newer version
|
||||
mv $dest $dest.~$max~
|
||||
new=`expr $max + 1`
|
||||
else # dest and dest.~nn~ are equal so
|
||||
rm $dest # delete dest leave old version behind
|
||||
new=`expr $max + 1`
|
||||
fi
|
||||
fi
|
||||
|
||||
# make new version
|
||||
|
||||
ln $file $dest.~$new~ # cp -p $file $dest.~$new~
|
||||
ln $dest.~$new~ $dest # and link it
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@ fi
|
||||
./scripts/loadup-lisp-from-mid.sh && \
|
||||
./scripts/loadup-full-from-lisp.sh && \
|
||||
./scripts/loadup-aux.sh && \
|
||||
./scripts/copy-all.sh && \
|
||||
ls -l loadups/*.sysout loadups/whereis.hash library/exports.all && \
|
||||
echo "**** DONE ****"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
32
scripts/loadup-db.sh
Executable file
32
scripts/loadup-db.sh
Executable file
@@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
export MEDLEYDIR=`pwd`
|
||||
|
||||
if [ ! -f run-medley ] ; then
|
||||
echo run from MEDLEYDIR
|
||||
exit 1
|
||||
fi
|
||||
|
||||
touch tmp/loadup.timestamp
|
||||
|
||||
# Keep (GREET) from finding an init file
|
||||
mkdir -p $MEDLEYDIR/tmp/logindir
|
||||
export HOME=$MEDLEYDIR/tmp/logindir
|
||||
export LOGINDIR=$MEDLEYDIR/tmp/logindir
|
||||
|
||||
scr="-sc 1024x768 -g 1042x790"
|
||||
|
||||
echo '" (IL:MEDLEY-INIT-VARS)(IL:FILESLOAD MEDLEY-UTILS)(IL:MAKE-FULLER-DB)(IL:LOGOUT T)"' > tmp/loadup-db.cm
|
||||
./run-medley $scr -loadup "$MEDLEYDIR"/tmp/loadup-db.cm tmp/full.sysout
|
||||
|
||||
if [ tmp/fuller.database -nt tmp/loadup.timestamp ]; then
|
||||
|
||||
echo ---- made ----
|
||||
ls -l tmp/fuller*
|
||||
echo --------------
|
||||
|
||||
else
|
||||
echo XXXXX FAILURE XXXXX
|
||||
ls -l tmp/fuller*
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user