From 0caa21c155fa91be044b300ca1de0e1a583e4cdb Mon Sep 17 00:00:00 2001 From: michelou Date: Mon, 20 Jun 2005 16:18:20 +0000 Subject: - moved to CVS repository "scala-website". --- support/scripts/website-build | 11 - support/scripts/website-print-xml | 11 - support/scripts/website-print-xml-distributions | 11 - support/scripts/website-print-xml-installers | 11 - support/scripts/website.sh | 396 ------------------------ 5 files changed, 440 deletions(-) delete mode 100755 support/scripts/website-build delete mode 100755 support/scripts/website-print-xml delete mode 100755 support/scripts/website-print-xml-distributions delete mode 100755 support/scripts/website-print-xml-installers delete mode 100644 support/scripts/website.sh diff --git a/support/scripts/website-build b/support/scripts/website-build deleted file mode 100755 index af45faaa88..0000000000 --- a/support/scripts/website-build +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -########################################################-*-Shell-script-*-#### -# Website-Build Command -############################################################################## -# $Id$ - -program="${0##*/}"; -source "${0%/*}/${program%%-*}.sh"; -"$program" "$@"; - -############################################################################## diff --git a/support/scripts/website-print-xml b/support/scripts/website-print-xml deleted file mode 100755 index 502e10be3c..0000000000 --- a/support/scripts/website-print-xml +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -########################################################-*-Shell-script-*-#### -# Website-Print-XML Command -############################################################################## -# $Id$ - -program="${0##*/}"; -source "${0%/*}/${program%%-*}.sh"; -"$program" "$@"; - -############################################################################## diff --git a/support/scripts/website-print-xml-distributions b/support/scripts/website-print-xml-distributions deleted file mode 100755 index 69f22093ed..0000000000 --- a/support/scripts/website-print-xml-distributions +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -########################################################-*-Shell-script-*-#### -# Website-Print-XML-Distributions Command -############################################################################## -# $Id$ - -program="${0##*/}"; -source "${0%/*}/${program%%-*}.sh"; -"$program" "$@"; - -############################################################################## diff --git a/support/scripts/website-print-xml-installers b/support/scripts/website-print-xml-installers deleted file mode 100755 index 933688d0fc..0000000000 --- a/support/scripts/website-print-xml-installers +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash -########################################################-*-Shell-script-*-#### -# Website-Print-XML-Installers Command -############################################################################## -# $Id$ - -program="${0##*/}"; -source "${0%/*}/${program%%-*}.sh"; -"$program" "$@"; - -############################################################################## diff --git a/support/scripts/website.sh b/support/scripts/website.sh deleted file mode 100644 index dad73e5155..0000000000 --- a/support/scripts/website.sh +++ /dev/null @@ -1,396 +0,0 @@ -########################################################-*-Shell-script-*-#### -# Website Functions -############################################################################## -# $Id$ - -source ${0%/*}/stdlib.sh; - -############################################################################## -# website-print-xml-distributions - -function website-print-xml-distributions-usage() { - echo "Usage: $program "; -} - -function website-print-xml-distributions-args() { - case "$1" in - -? | -h | --help ) $program-usage; exit 0;; - --version ) echo "$program (bash script) $version";exit 0;; - --verbose ) verbose="true"; return 1;; - -* ) args-option-unknown "$@";; - * ) args-append-array args "$@";; - esac; -} - -function website-print-xml-distributions-get-archive() { - local archive="$1"; shift 1; - - if [ -f "$archive" ]; then - local name=`basename $archive`; - local size=`stat -l -c%s $archive`; - local checksum=`sed -e's/\([0-9a-fA-F]*\).*/\1/' $archive.md5`; - echo ""; - fi; -} - -function website-print-xml-distributions() { - local program="$FUNCNAME"; - local version='$Revision$'; - local verbose="false"; - local -a args; - args-loop "$@"; - - [ ${#args[@]} == 1 ] || { $program-usage 1>&2; exit 1; }; - local archivedir="${args[0]}"; - - if [ ! -d "$archivedir" ]; then - abort "could not find directory '$archivedir'"; - fi; - - echo ""; - echo ""; - - local file; - local archives=`ls -1t $archivedir/*.tar.gz`; - for file in $archives; do - local basename=`basename $file .tar.gz`; - local tgz_file="$archivedir/$basename.tar.gz"; - local bz2_file="$archivedir/$basename.tar.bz2"; - local zip_file="$archivedir/$basename.zip"; - - local version_regex="s/[^-]*-\([0-9]*\(\.[0-9]*\.\|-\)[0-9]*\)/\1/"; - local version=`echo $basename | sed "$version_regex"`; - local date=`date -r "$file" +%d-%b-%Y`; - local tgz_line=`$program-get-archive $tgz_file`; - local bz2_line=`$program-get-archive $bz2_file`; - local zip_line=`$program-get-archive $zip_file` - - echo " "; - echo " $version"; - echo " $date"; - echo " $tgz_line"; - echo " $bz2_line"; - echo " $zip_line"; - echo " "; - echo ""; - done; - - echo ""; -} - -############################################################################## -# website-print-xml-installers - -function website-print-xml-installers-usage() { - echo "Usage: $program "; -} - -function website-print-xml-installers-args() { - case "$1" in - -? | -h | --help ) $program-usage; exit 0;; - --version ) echo "$program (bash script) $version";exit 0;; - --verbose ) verbose="true"; return 1;; - -* ) args-option-unknown "$@";; - * ) args-append-array args "$@";; - esac; -} - -function website-print-xml-installers-add-entry() { - [ $# = 5 ] || abort "internal error"; - local archive="$1"; shift 1; - local platform="$1"; shift 1; - local description="$1"; shift 1; - local path="$1"; shift 1; - local anchor="$1"; shift 1; - - if [ ! -f "$archive" ]; then - warning "could not find file '$archive'"; - return 1; - fi; - - local size=`stat -l -c%s "$archive"`; - local size=`echo "scale=1; $size/1024/1024" | bc`; - case "$size" in .* ) size="0$size";; esac; - - echo " "; - [ -n $anchor ] && - echo " $platform"; - echo " $description"; - echo " "; - echo " $anchor"; - echo " "; - echo ""; -} - -function website-print-xml-installers-add-installer() { - [ $# = 4 ] || abort "internal error"; - local installerdir="$1"; shift 1; - local path="$1"; shift 1; - local platform="$1"; shift 1; - local description="$1"; shift 1; - - local path="Web_Installers/InstData/$path" - local archive="$installerdir/$path"; shift 1; - $program-add-entry \ - "$archive" "$platform" "$description" "$path" "$platform"; -} - -function website-print-xml-installers-add-installers() { - [ $# = 1 ] || abort "internal error"; - local installerdir="$1"; shift 1; - - if [ ! -d "$installerdir" ]; then - warning "could not find directory '$installerdir'"; - return 1; - fi; - - local -a add=($program-add-installer "$installerdir"); - "${add[@]}" "Windows/NoVM/install.exe" "win" "Windows Installer"; - "${add[@]}" "MacOSX/install.zip" "macosx" "MacOSX Installer"; - "${add[@]}" "Linux/NoVM/install.bin" "linux" "Linux Installer"; - "${add[@]}" "Solaris/NoVM/install.bin" "solaris" "Solaris Installer"; - "${add[@]}" "AIX/NoVM/install.bin" "aix" "AIX Installer"; - "${add[@]}" "HPUX/NoVM/install.bin" "hp" "HPUX Installer"; - "${add[@]}" "GenericUnix/install.bin" "unix" "GenericUnix Installer"; - "${add[@]}" "Java/install.jar" "other" "Java Installer"; -} - -function website-print-xml-installers-add-archive() { - [ $# = 4 ] || abort "internal error"; - local archive="$1"."$2"; shift 1; - local suffix="$1"; shift 1; - local platform="$1"; shift 1; - local description="$1"; shift 1; - - local path="./distrib/files/"`basename $archive`; - $program-add-entry "$archive" "$platform" "$description" "$path" "$suffix"; -} - -function website-print-xml-installers-add-archives() { - [ $# = 1 ] || abort "internal error"; - local basepath="$1"; shift 1; - - local -a add=($program-add-archive "$basepath"); - "${add[@]}" "tar.gz" "tgz" "Gzip Unix tarball (Unix/Cygwin)"; - "${add[@]}" "tar.bz2" "bz2" "Bz2 Unix tarball (Unix/Cygwin)"; - "${add[@]}" "zip" "zip" "Zip Archive (Windows)"; -} - -function website-print-xml-installers-get-params() { - [ $# = 1 ] || abort "internal error"; - local installhtm="$1"; shift 1; - - if [ ! -f "$installhtm" ]; then - warning "could not find file '$installhtm'"; - return 1; - fi; - - local start=`grep -n "^setArchiveFile()\$" "$installhtm"`; - local end=`grep -n "^platformButtons()\$" "$installhtm"`; - start=$[${start%%:*} + 3]; - end=$[${end%%:*} - 2]; - - head -$end "$installhtm" | tail -$[$end - $start] \ - | sed '-es/[ ]*//' '-es!>$!/>!' '-e/^$/d'; -} - -function website-print-xml-installers() { - local program="$FUNCNAME"; - local version='$Revision$'; - local verbose="false"; - local -a args; - args-loop "$@"; - - [ ${#args[@]} == 1 ] || { $program-usage 1>&2; exit 1; }; - local basepath="${args[0]}"; - - echo ""; - echo ""; - $program-add-installers "$basepath.ia"; - $program-add-archives "$basepath"; - echo ""; - - echo ""; - echo ""; - echo ""; - echo ""; - $program-get-params "$basepath.ia/Web_Installers/install-unix.htm"; - $program-get-params "$basepath.ia/Web_Installers/install-windows.htm"; - echo ""; - echo ""; - echo ""; -} - -############################################################################## -# website-print-xml - -function website-print-xml-usage() { - echo "Usage: $program "; -} - -function website-print-xml-args() { - case "$1" in - -? | -h | --help ) $program-usage; exit 0;; - --version ) echo "$program (bash script) $version";exit 0;; - --verbose ) verbose="true"; return 1;; - -* ) args-option-unknown "$@";; - * ) args-append-array args "$@";; - esac; -} - -function website-print-xml() { - local program="$FUNCNAME"; - local version='$Revision$'; - local verbose="false"; - local -a args; - args-loop "$@"; - - [ ${#args[@]} == 2 ] || { $program-usage 1>&2; exit 1; }; - local archivedir="${args[0]}"; - local current="${args[1]}"; - - if [ ! -d "$archivedir" ]; then - abort "could not find directory '$archivedir'"; - fi; - - echo ""; - echo ""; - echo "$current"; - echo ""; - $program-distributions "$archivedir"; - echo ""; - $program-installers "$archivedir/scala-$current"; - echo ""; - echo ""; -} - -############################################################################## -# website-build - -function website-build-usage() { - echo "Usage: $program "; -} - -function website-build-args() { - case "$1" in - -? | -h | --help ) $program-usage; exit 0;; - --version ) echo "$program (bash script) $version";exit 0;; - --verbose ) verbose="true"; return 1;; - -* ) args-option-unknown "$@";; - * ) args-append-array args "$@";; - esac; -} - -function website-build-link() { - [ $# = 2 ] || abort "internal error"; - local srcfile="$1"; shift 1; - local dstdir="$1"; shift 1; - - if [ ! -e "$srcfile" ]; then - abort "could not find directory or file '$srcfile'"; - fi; - - if [ ! -d "$dstdir" ]; then - abort "could not find directory '$dstdir'"; - fi; - - run ln -s "$srcfile" "$dstdir"; -} - -function website-build-pdf-link() { - [ $# = 3 ] || abort "internal error"; - local srcdir="$1"; shift 1; - local basename="$1"; shift 1; - local dstdir="$1"; shift 1; - - $program-link "$srcdir/$basename.pdf" "$dstdir"; - run acroread -toPostScript "$dstdir/$basename.pdf"; - run gzip -9 "$dstdir/$basename.ps"; -} - -function website-build() { - local program="$FUNCNAME"; - local version='$Revision$'; - local verbose="false"; - local -a args; - args-loop "$@"; - - [ ${#args[@]} == 2 ] || { $program-usage 1>&2; exit 1; }; - local installdir="${args[0]}"; - local archivedir="${args[1]}"; - - if [ ! -d "$installdir" ]; then - abort "could not find directory '$installdir'"; - fi; - - if [ ! -d "$archivedir" ]; then - abort "could not find directory '$archivedir'"; - fi; - - # determine version of installed scala - if [ ! -x "$installdir/bin/scala-info" ]; then - abort "could not find script '$installdir/bin/scala-info'"; - fi; -# !!! local current=`$installdir/bin/scala-info --version`; - local current=`cat $installdir/VERSION`; - if [ $? != 0 -o -z "$current" ]; then - abort "could not determine version of installed scala"; - fi; - - # remove old repository and create new one - local websitedir="$archivedir/website"; - [ -d "$websitedir" ] && run rm -rf "$websitedir"; - run mkdir "$websitedir"; - run mkdir "$websitedir/doc"; - run mkdir "$websitedir/examples"; - - # create website.xml - runO "$websitedir/website.xml" website-print-xml "$archivedir" "$current"; - - # link web installers - $program-link "$archivedir/scala-$current.ia/Web_Installers" "$websitedir"; - - # link api documentation - $program-link "$installdir/doc/api" "$websitedir/doc"; - - # link PDF documents and create PostScript versions - local addonsdir="$archivedir/scala-$current.addons" - $program-pdf-link "$installdir/doc" "ScalaReference" "$websitedir/doc"; - $program-pdf-link "$installdir/doc" "ScalaByExample" "$websitedir/doc"; - $program-pdf-link "$installdir/doc" "ScalaTutorial" "$websitedir/doc"; - $program-pdf-link "$addonsdir/doc" "ScalaRationale" "$websitedir/doc"; - $program-pdf-link "$addonsdir/doc" "ProgrammingInScala" "$websitedir/doc"; - - # copy old PDF and PostScript version of overview - local resourcesdir="$websitedir-resources" - run cp -a "$resourcesdir/doc/ScalaIntro.pdf" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/ScalaIntro.ps.gz" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/ScalaOverview.pdf" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/ScalaOverview.ps.gz" "$websitedir/doc/"; - - # copy old PDF and PostScript version of Scala related documents - run cp -a "$resourcesdir/doc/IC_TECH_REPORT_200433.pdf" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/IC_TECH_REPORT_200433.ps.gz" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/PiLib.pdf" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/PiLib.ps.gz" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/ScalaAsmL.pdf" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/ScalaAsmL.ps.gz" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/MetaScala.pdf" "$websitedir/doc/"; - run cp -a "$resourcesdir/doc/MetaScala.ps.gz" "$websitedir/doc/"; - - # copy old MSIL examples - run cp -a "$resourcesdir/doc/test.il.txt" "$websitedir/doc/"; - - # copy old Scala examples - run cp -a "$resourcesdir/examples/addressbook.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/callccInterpreter.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/fors.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/patterns.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/random.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/simpleInterpreter.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/sort.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/sort1.html" "$websitedir/examples/"; - run cp -a "$resourcesdir/examples/timeofday.html" "$websitedir/examples/"; -} - -############################################################################## -- cgit v1.2.3