jcs: Ongoing improvements

- Set jcs dir smartly
  - Jcs init now installs jcs into /usr/bin instead of /usr/local/bin
  - Jcs makeinf is now less careful (asks fewer questions)
This commit is contained in:
Jan Lindemann 2006-09-14 18:24:23 +00:00 committed by Jan Lindemann
commit 8408864a5e

View file

@ -38,7 +38,7 @@ JCS_CONF_FILES="
/etc/jcs/templates/dir/src/Makefile
"
JCS_EXE_INSTALL_DIR=/usr/local/bin
JCS_EXE_INSTALL_DIR=/usr/bin
txtout() {
MARKER=$1
@ -181,6 +181,13 @@ usage() {
echo "Moving old /etc/jcs/jcs.mk to /etc/jcs/jcs.mk.oldstyle."
mv /etc/jcs/jcs.mk /etc/jcs/jcs.mk.oldstyle
fi
if [ -f /usr/local/bin/jcs ]; then
if [ $JCS_EXE_INSTALL_DIR != /usr/local/bin ]; then
echo -n " + removing /usr/local/bin/jcs ... "
rm /usr/local/bin/jcs
echo done
fi
fi
# --- be downward compatible <
# --- be downward compatible >
if [ -f /etc/jcs/jcs.mk ] ; then
@ -1201,12 +1208,13 @@ for LINKFILE in $LINKFILES ; do
rm *.sec *.fil 2>/dev/null
rm new_link.sh
echo The following links are obsolete now:
cat old_links.txt | awk '{print " + " $0}'
echo -n 'Do you want them removed (yes|no)? '
while read -r ANSW && test ! "$ANSW" = yes -a ! "$ANSW" = no ; do
echo -n ""
done
#echo The following links are obsolete now:
#cat old_links.txt | awk '{print " + " $0}'
#echo -n 'Do you want them removed (yes|no)? '
#while read -r ANSW && test ! "$ANSW" = yes -a ! "$ANSW" = no ; do
# echo -n ""
#done
ANSW=yes
if [ "$ANSW" = yes ] ; then
for FILE in `cat old_links.txt` ; do
@ -1219,18 +1227,20 @@ for LINKFILE in $LINKFILES ; do
done
echo It is recommended that you check $INF.
echo -n "Do you want \"make install\" to be issued "
echo -n "now to reinstall the files? "
while read -r ANSW && test ! "$ANSW" = yes -a ! "$ANSW" = no ; do
echo -n ""
done
test "$ANSW" = yes && make install
#echo -n "Do you want \"make install\" to be issued "
#echo -n "now to reinstall the files? "
#
#while read -r ANSW && test ! "$ANSW" = yes -a ! "$ANSW" = no ; do
# echo -n ""
#done
#test "$ANSW" = yes && make install
else
echo It is recommended that you do this yourself.
fi
rm -f old_links.txt
cd $CONFIG_BASEDIR
done
@ -1961,10 +1971,10 @@ JNT_JCSDIR=/tmp
--<<<-- jcs.conf.oldstyle --
-->>>-- jcs.conf --
jcs_dir=/tmp/jcs
jcs_dir=/home/`who -m | awk '{print $1}'`/local/src/cvs.stable/conf/jannet.de/`hostname`/`/opt/ytools/bin/get_os.sh`
jcs_owner=root
jcs_group=root
jcs_log_dir=/tmp/jcs/log
jcs_log_dir=$jcs_dir/log
jcs_file_extension=inf
use_checksum=false
update_checksum_command="/home/tripwire/bin/fs_checksum.sh update"