1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
function trim_filelist()
{
sort |
uniq | # remove duplicate lines
sed 's/^[ \t]*//;s/[ \t]*$//' | # remove leading and trailing whitespaces
sed '/^$/d' # drop empty lines
}
function check_filelist() # check presence of all files
{
while read f; do
[ -e "$f" ] && continue
echo missing: "$f"; exit 1
done
exit 0
}
function ask_mrproper()
{
echo ""
echo "--------------------------------------------------"
echo "!!! WARNING !!! WARNING !!! WARNING !!!WARNING !!!"
echo "--------------------------------------------------"
echo "All files they are not part of the CVS source tree"
echo " and they not registered in .filelist-devel"
echo " will be killed."
echo ""
echo -n "Please type yyeess if you are know what you do: "
read answer
test "$answer" != "yyeess" && exit 1
exit 0
}
function ask() # $1=Question $2=Answer for TRUE
{
echo ""
echo -n "$1 : "
read answer
test "$answer" != "$2" && exit 1
exit 0
}
|