"Fossies" - the Fresh Open Source Software Archive

Member "partlogic-0.9-src/utils/archive-source.sh" (16 Apr 2020, 2157 Bytes) of package /linux/privat/partlogic-0.9-src.zip:


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. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "archive-source.sh": 0.77_vs_0.85.

    1 #!/bin/sh
    2 ##
    3 ##  Partition Logic
    4 ##  Copyright (C) 1998-2020 J. Andrew McLaughlin
    5 ##
    6 ##  archive-source.sh
    7 ##
    8 
    9 # This just does all of the things necessary to prepare an archive (zipfile)
   10 # of the Partition Logic sources and utilities
   11 
   12 ZIPLOG=./zip.log
   13 
   14 echo ""
   15 echo "Making Partition Logic SOURCE archive"
   16 echo ""
   17 
   18 # Are we doing a release version?  If the argument is "-r" then we use the
   19 # release number in the destination directory name.  Otherwise, we assume an
   20 # interim package and use the date instead.
   21 if [ "$1" = "-r" ] ; then
   22     # What is the current release version?
   23     RELEASE=`./release.sh`
   24     echo "(doing RELEASE version $RELEASE)"
   25     echo ""
   26 else
   27     # What is the date?
   28     RELEASE=`date +%Y-%m-%d`
   29     echo "(doing INTERIM version $RELEASE -- use -r flag for RELEASES)"
   30     echo ""
   31 fi
   32 
   33 DESTDIR=partlogic-"$RELEASE"-src
   34 
   35 # Make a copy of the Partition Logic directory.  We will not fiddle with the
   36 # current working area.
   37 rm -Rf "$DESTDIR" /tmp/"$DESTDIR"
   38 mkdir -p /tmp/"$DESTDIR"
   39 (cd ..; tar cf - *) | (cd /tmp/"$DESTDIR"; tar xf - )
   40 mv /tmp/"$DESTDIR" ./
   41 
   42 # Make sure it's clean
   43 echo -n "Making clean... "
   44 rm -f "$DESTDIR"/visopsys
   45 make -C "$DESTDIR" clean > /dev/null 2>&1
   46 # Remove all the things we don't want to distribute
   47 # CVS droppings
   48 find "$DESTDIR" -name CVS -exec rm -R {} \; > /dev/null 2>&1
   49 # Other stuff
   50 rm -f "$DESTDIR"/*.patch
   51 rm -f "$DESTDIR"/RELEASE.txt
   52 rm -Rf "$DESTDIR"/docs
   53 rm -f "$DESTDIR"/src/ISSUES.txt
   54 rm -Rf "$DESTDIR"/patches
   55 rm -Rf "$DESTDIR"/work
   56 # Stuff from the 'plus' distribution
   57 rm -Rf "$DESTDIR"/src/lib/liblic
   58 rm -f "$DESTDIR"/src/include/sys/keygen.h
   59 echo Done
   60 
   61 echo -n "Archiving... "
   62 echo "Partition Logic $RELEASE Source Release" > /tmp/comment
   63 echo "Copyright (C) 1998-2020 J. Andrew McLaughlin" >> /tmp/comment
   64 rm -f "$DESTDIR".zip
   65 zip -9 -z -r "$DESTDIR".zip "$DESTDIR" < /tmp/comment > $ZIPLOG 2>&1
   66 if [ $? -ne 0 ] ; then
   67     echo ""
   68     echo -n "Not able to create zip file "$DESTDIR".zip.  "
   69     echo "See $ZIPLOG.  Terminating."
   70     echo ""
   71     exit 1
   72 fi
   73 rm -f /tmp/comment $ZIPLOG
   74 echo Done
   75 
   76 echo -n "Cleaning up... "
   77 # Remove the working directory
   78 rm -Rf "$DESTDIR"
   79 echo Done
   80 
   81 echo "File is: $DESTDIR.zip"
   82 echo ""
   83 
   84 exit 0
   85