Some fixes to pub-bins.sh script

This commit is contained in:
Geoff R. McLane 2015-09-07 19:28:29 +02:00
parent 5ede47ff61
commit 50e69dbcb1

View file

@ -11,11 +11,15 @@ fi
echo "$BN: Read file $TMPFIL" echo "$BN: Read file $TMPFIL"
ls -l $TMPFIL ls -l $TMPFIL
# while read LINE; do TMPCNT=0
# TMPVER="$LINE" while read LINE; do
#done <$TMPFIL if [ "$TMPCNT" = "0" ]; then
TMPVER="$LINE"
fi
TMPCNT=`expr $TMPCNT + 1`
done <$TMPFIL
#TMPVER=$(<$TMPFIL) #TMPVER=$(<$TMPFIL)
TMPVER=$(cat $TMPFIL) #TMPVER=$(cat $TMPFIL)
echo "$BN: Version $TMPVER" echo "$BN: Version $TMPVER"
@ -28,20 +32,22 @@ ask()
} }
TMPBIN="$HOME/projects/html_tidy/tidy-bin" TMPBIN="$HOME/projects/html_tidy/binaries"
TMPBINS="$TMPBIN/binaries" TMPBINS="$TMPBIN/binaries"
if [ ! -d "$TMPBINS" ]; then if [ ! -d "$TMPBINS" ]; then
echo "$BN: Can NOT location '$TMPBINS'! *** FIX ME ***" echo "$BN: Can NOT location '$TMPBINS'! *** FIX ME ***"
exit 1 exit 1
fi fi
TMPDD="$TMPBINS/tidy-$TMPVER" TMPDD="$TMPBINS/tidy-$TMPVER"
if [ ! -d "$TMPDD" ]; then
echo "" echo ""
if [ -d "$TMPDD" ]; then
echo "$BN: Destination is $TMPDD"
else
echo "$BN: This is a NEW installation in $TMPDD" echo "$BN: This is a NEW installation in $TMPDD"
fi fi
TMPFIL1="tidy5-$TMPVER-$TMPWV.deb" TMPFIL1="tidy-$TMPVER-$TMPWV.deb"
TMPFIL2="tidy5-$TMPVER-$TMPWV.rpm" TMPFIL2="tidy-$TMPVER-$TMPWV.rpm"
if [ ! -f "$TMPFIL1" ]; then if [ ! -f "$TMPFIL1" ]; then
echo "$BN: $TMPFIL1 does not exits" echo "$BN: $TMPFIL1 does not exits"
echo "$BN: Have you run '[sudo] make package'?" echo "$BN: Have you run '[sudo] make package'?"
@ -56,6 +62,11 @@ echo ""
echo "$BN: Will publish..." echo "$BN: Will publish..."
echo "$TMPFIL1" echo "$TMPFIL1"
echo "$TMPFIL2" echo "$TMPFIL2"
if [ ! -d "$TMPDD" ]; then
echo "$BN: Will create dir $TMPDD"
else
echo "$BN: Destination $TMPDD"
fi
echo "" echo ""
echo "$BN: *** CONTINUE? ***" echo "$BN: *** CONTINUE? ***"
ask ask