Whitespace only. Make the style of the contributed sections consistent with

the rest of the file. (Read, put it back the way I like it.)
This commit is contained in:
Doug Barton 2000-10-29 07:47:51 +00:00
parent 9fc9ecb643
commit 3bc374238a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=67850

View File

@ -46,145 +46,145 @@ display_help () {
# Loop allowing the user to use sdiff to merge files and display the merged
# file.
merge_loop () {
case "${VERBOSE}" in
'') ;;
*)
echo " *** Type h at the sdiff prompt (%) to get usage help"
;;
esac
echo ''
MERGE_AGAIN=yes
while [ "${MERGE_AGAIN}" = "yes" ]; do
# Prime file.merged so we don't blat the owner/group id's
cp -p "${COMPFILE}" "${COMPFILE}.merged"
sdiff -o "${COMPFILE}.merged" --text --suppress-common-lines \
--width=${SCREEN_WIDTH:-80} "${COMPFILE#.}" "${COMPFILE}"
INSTALL_MERGED=V
while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do
echo ''
echo " Use 'i' to install merged file"
echo " Use 'r' to re-do the merge"
echo " Use 'v' to view the merged file"
echo " Default is to leave the temporary file to deal with by hand"
echo ''
read -p " *** How should I deal with the merged file? [Leave it for later] " INSTALL_MERGED
case "${VERBOSE}" in
'') ;;
*)
echo " *** Type h at the sdiff prompt (%) to get usage help"
;;
esac
echo ''
MERGE_AGAIN=yes
while [ "${MERGE_AGAIN}" = "yes" ]; do
# Prime file.merged so we don't blat the owner/group id's
cp -p "${COMPFILE}" "${COMPFILE}.merged"
sdiff -o "${COMPFILE}.merged" --text --suppress-common-lines \
--width=${SCREEN_WIDTH:-80} "${COMPFILE#.}" "${COMPFILE}"
INSTALL_MERGED=V
while [ "${INSTALL_MERGED}" = "v" -o "${INSTALL_MERGED}" = "V" ]; do
echo ''
echo " Use 'i' to install merged file"
echo " Use 'r' to re-do the merge"
echo " Use 'v' to view the merged file"
echo " Default is to leave the temporary file to deal with by hand"
echo ''
read -p " *** How should I deal with the merged file? [Leave it for later] " INSTALL_MERGED
case "${INSTALL_MERGED}" in
[iI])
mv "${COMPFILE}.merged" "${COMPFILE}"
echo ''
if mm_install "${COMPFILE}"; then
echo " *** Merged version of ${COMPFILE} installed successfully"
else
echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later"
fi
unset MERGE_AGAIN
;;
[rR])
rm "${COMPFILE}.merged"
;;
[vV])
${PAGER} "${COMPFILE}.merged"
;;
'')
echo " *** ${COMPFILE} will remain for your consideration"
unset MERGE_AGAIN
;;
*)
echo "invalid choice: ${INSTALL_MERGED}"
INSTALL_MERGED=V
;;
esac
done
done
case "${INSTALL_MERGED}" in
[iI])
mv "${COMPFILE}.merged" "${COMPFILE}"
echo ''
if mm_install "${COMPFILE}"; then
echo " *** Merged version of ${COMPFILE} installed successfully"
else
echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand later"
fi
unset MERGE_AGAIN
;;
[rR])
rm "${COMPFILE}.merged"
;;
[vV])
${PAGER} "${COMPFILE}.merged"
;;
'')
echo " *** ${COMPFILE} will remain for your consideration"
unset MERGE_AGAIN
;;
*)
echo "invalid choice: ${INSTALL_MERGED}"
INSTALL_MERGED=V
;;
esac
done
done
}
# Loop showing user differences between files, allow merge, skip or install
# options
diff_loop () {
HANDLE_COMPFILE=v
HANDLE_COMPFILE=v
while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o "${HANDLE_COMPFILE}" = "NOT V" ]; do
if [ -f "${COMPFILE#.}" -a -f "${COMPFILE}" ]; then
if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then
(
echo " *** Displaying differences between ${COMPFILE} and installed version:"
echo ''
diff "${DIFF_FLAG}" "${COMPFILE#.}" "${COMPFILE}"
) | ${PAGER}
echo ''
fi
else
echo " *** There is no installed version of ${COMPFILE}"
NO_INSTALLED=yes
fi
echo " Use 'd' to delete the temporary ${COMPFILE}"
echo " Use 'i' to install the temporary ${COMPFILE}"
case "${NO_INSTALLED}" in
'')
echo " Use 'm' to merge the old and new versions"
echo " Use 'v' to view to differences between the old and new versions again"
;;
esac
echo ''
echo " Default is to leave the temporary file to deal with by hand"
echo ''
read -p "How should I deal with this? [Leave it for later] " HANDLE_COMPFILE
case "${HANDLE_COMPFILE}" in
[dD])
rm "${COMPFILE}"
echo ''
echo " *** Deleting ${COMPFILE}"
;;
[iI])
echo ''
if mm_install "${COMPFILE}"; then
echo " *** ${COMPFILE} installed successfully"
else
echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand"
fi
;;
[mM])
case "${NO_INSTALLED}" in
'')
# interact with user to merge files
merge_loop
;;
*)
echo ''
echo " *** There is no installed version of ${COMPFILE}"
echo ''
HANDLE_COMPFILE="NOT V"
;;
esac # End of "No installed version of file but user selected merge" test
;;
[vV])
continue
;;
'')
echo ''
echo " *** ${COMPFILE} will remain for your consideration"
;;
*)
# invalid choice, show menu again.
echo "invalid choice: ${HANDLE_COMPFILE}"
echo ''
HANDLE_COMPFILE="NOT V"
continue
;;
esac # End of "How to handle files that are different"
done
echo ''
unset NO_INSTALLED
echo ''
case "${VERBOSE}" in
'') ;;
*)
sleep 3
;;
esac
while [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" -o "${HANDLE_COMPFILE}" = "NOT V" ]; do
if [ -f "${COMPFILE#.}" -a -f "${COMPFILE}" ]; then
if [ "${HANDLE_COMPFILE}" = "v" -o "${HANDLE_COMPFILE}" = "V" ]; then
(
echo " *** Displaying differences between ${COMPFILE} and installed version:"
echo ''
diff "${DIFF_FLAG}" "${COMPFILE#.}" "${COMPFILE}"
) | ${PAGER}
echo ''
fi
else
echo " *** There is no installed version of ${COMPFILE}"
NO_INSTALLED=yes
fi
echo " Use 'd' to delete the temporary ${COMPFILE}"
echo " Use 'i' to install the temporary ${COMPFILE}"
case "${NO_INSTALLED}" in
'')
echo " Use 'm' to merge the old and new versions"
echo " Use 'v' to view to differences between the old and new versions again"
;;
esac
echo ''
echo " Default is to leave the temporary file to deal with by hand"
echo ''
read -p "How should I deal with this? [Leave it for later] " HANDLE_COMPFILE
case "${HANDLE_COMPFILE}" in
[dD])
rm "${COMPFILE}"
echo ''
echo " *** Deleting ${COMPFILE}"
;;
[iI])
echo ''
if mm_install "${COMPFILE}"; then
echo " *** ${COMPFILE} installed successfully"
else
echo " *** Problem installing ${COMPFILE}, it will remain to merge by hand"
fi
;;
[mM])
case "${NO_INSTALLED}" in
'')
# interact with user to merge files
merge_loop
;;
*)
echo ''
echo " *** There is no installed version of ${COMPFILE}"
echo ''
HANDLE_COMPFILE="NOT V"
;;
esac # End of "No installed version of file but user selected merge" test
;;
[vV])
continue
;;
'')
echo ''
echo " *** ${COMPFILE} will remain for your consideration"
;;
*)
# invalid choice, show menu again.
echo "invalid choice: ${HANDLE_COMPFILE}"
echo ''
HANDLE_COMPFILE="NOT V"
continue
;;
esac # End of "How to handle files that are different"
done
echo ''
unset NO_INSTALLED
echo ''
case "${VERBOSE}" in
'') ;;
*)
sleep 3
;;
esac
}
# Set the default path for the temporary root environment
@ -748,3 +748,4 @@ esac
echo ''
exit 0