"Fossies" - the Fresh Open Source Software Archive

Member "tidy-html5-5.8.0/build/cmake/build-api.sh" (16 Jul 2021, 1775 Bytes) of package /linux/www/tidy-html5-5.8.0.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Bash source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 #!/bin/sh
    2 #< build-api.sh - 20151020 - build the API documentation for publishing...
    3 BN=`basename $0`
    4 TMPSRC="../.."
    5 TMPFIL="$TMPSRC/version.txt"
    6 if [ ! -f "$TMPFIL" ]; then
    7     echo "Can NOT locate $TMPFIL! *** FIX ME ***"
    8     exit 1
    9 fi
   10 echo "$BN: Read file $TMPFIL"
   11 ls -l $TMPFIL
   12 
   13 TMPCNT=0
   14 while read LINE; do
   15     if [ "$TMPCNT" = "0" ]; then
   16         TMPVER="$LINE"
   17     fi
   18     TMPCNT=`expr $TMPCNT + 1`
   19 done <$TMPFIL
   20 #TMPVER=$(<$TMPFIL)
   21 #TMPVER=$(cat $TMPFIL)
   22 
   23 echo "$BN: Version $TMPVER"
   24 TMPZIP="tidylib_api-$TMPVER.zip"
   25 
   26 ask()
   27 {
   28     pause
   29     if [ ! "$?" = "0" ]; then
   30         exit 1
   31     fi
   32 }
   33 
   34 TMPDIR="../../documentation/temp"
   35 TMPZFIL="../../documentation/$TMPZIP"
   36 
   37 if [ -f "$TMPZFIL" ]; then
   38     ls -l $TMPZFIL
   39     echo "$BN: WARNING: Current ZIP will be overwritten!"
   40     echo "$BN: DO you want to coninue?"
   41     ask
   42 fi
   43 
   44 TMPFIL="build-me.sh"
   45 if [ ! -x "$TMPFIL" ]; then
   46     echo "$BN: Can NOT locate '$TMPFIL'! *** FIX ME ***"
   47     echo "$BN: This is a simple build script, that accepts parameters..."
   48     exit 1
   49 fi
   50 
   51 if [ -d "$TMPDIR" ]; then
   52     echo "$BN: Directory '$TMPDIR' will be deleted prior the documentaion build..."
   53 fi
   54 
   55 ./$TMPFIL -DBUILD_DOCUMENTATION:BOOL=YES
   56 if [ ! "$?" = "0" ]; then
   57     echo "$BN: The running of $TMPFIL failed! ????"
   58     exit 1
   59 fi
   60 
   61 if [ -d "$TMPDIR" ]; then
   62     echo "$BN: Deleting '$TMPDIR'..."
   63     cd $TMPDIR
   64     rm -rf *
   65     cd -
   66 fi
   67 
   68 echo "$BN: Doing 'make documentation'..."
   69 make documentation
   70 
   71 if [ -d "$TMPDIR" ]; then
   72     echo "$BN: Generated a new '$TMPDIR'..."
   73     if [ -f "$TMPZFIL" ]; then
   74         rm -fv $TMPZFIL
   75     fi
   76     cd $TMPDIR
   77     echo "$BN: Generating ../$TMPZIP..."
   78     zip -r ../$TMPZIP * >/dev/null
   79     ls -l ../$TMPZIP
   80     cd -
   81 else
   82     echo "$BN: WARNING '$TMPDIR' not generated!"
   83     exit 1
   84 fi
   85 
   86 exit 0
   87 
   88 # eof
   89