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