mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 18:58:04 +02:00
tools: create_lazarus_export_tgz.sh pas2jszip
git-svn-id: trunk@61668 -
This commit is contained in:
parent
343fabb424
commit
ccf8dc0a3b
@ -2,28 +2,47 @@
|
||||
#
|
||||
# Author: Mattias Gaertner
|
||||
#
|
||||
# Usage: ./create_lazarus_export_tgz.sh [chmhelp] [download] outputfilename
|
||||
# Usage: ./create_lazarus_export_tgz.sh [chmhelp] [download] outputfilename.tgz
|
||||
#
|
||||
# Options:
|
||||
# chmhelp add chm,kwd files in docs/chm
|
||||
# download download instead of using the current files
|
||||
# chmhelp add chm,kwd files in docs/chm
|
||||
# pas2jszip <pas2js-linux-version.zip>
|
||||
# unzip pas2js release zip to "pas2js/version"
|
||||
#
|
||||
|
||||
Download=
|
||||
UseCHMHelp=
|
||||
OutputFile=
|
||||
TmpDir=~/tmp
|
||||
Pas2jsZip=
|
||||
|
||||
LastParam=
|
||||
while [ $# -gt 0 ]; do
|
||||
echo "param=$1"
|
||||
case "$1" in
|
||||
download)
|
||||
Download=yes
|
||||
;;
|
||||
chmhelp)
|
||||
echo "using files in docs/chm"
|
||||
UseCHMHelp=1
|
||||
;;
|
||||
download)
|
||||
Download=yes
|
||||
pas2jszip)
|
||||
shift
|
||||
echo "param=$1"
|
||||
Pas2jsZip=$1
|
||||
Pattern="*pas2js*.zip"
|
||||
if [[ $Pas2jsZip == $Pattern ]]; then
|
||||
echo "using pas2js zip file $Pas2jsZip"
|
||||
else
|
||||
echo "invalid pas2js zip file $Pas2jsZip"
|
||||
exit -1
|
||||
fi
|
||||
if [ ! -f $Pas2jsZip ]; then
|
||||
echo "missing pas2js zip file $Pas2jsZip"
|
||||
exit -1
|
||||
fi
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -41,7 +60,7 @@ done
|
||||
set -e
|
||||
|
||||
if [ "x$OutputFile" = "x" ]; then
|
||||
echo "Usage: ./create_lazarus_export_tgz.sh [chmhelp] [download] outputfilename"
|
||||
echo "Usage: ./create_lazarus_export_tgz.sh [chmhelp] [download] outputfilename.tgz"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -71,6 +90,19 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n $Pas2jsZip ]; then
|
||||
# unzip pas2jszip to pas2js/version
|
||||
mkdir $TmpLazDir/pas2js # fails if already there -> good
|
||||
unzip $Pas2jsZip -d $TmpLazDir/pas2js
|
||||
Pas2jsBin="$TmpLazDir/pas2js/*pas2js*/bin/pas2js"
|
||||
if [ ! -f $Pas2jsBin ]; then
|
||||
echo "missing $Pas2jsZip/*pas2js*/bin/pas2js"
|
||||
exit 1
|
||||
fi
|
||||
Pas2jsVer=$($Pas2jsBin -iV | tr -d '\n')
|
||||
mv $TmpLazDir/pas2js/*pas2js* $TmpLazDir/pas2js/$Pas2jsVer
|
||||
fi
|
||||
|
||||
# add ide/revision.inc
|
||||
echo "const RevisionStr = '$Revision';" > $TmpLazDir/ide/revision.inc
|
||||
|
||||
@ -79,6 +111,7 @@ echo "packing ..."
|
||||
tar cvzf lazarus.tgz lazarus
|
||||
cd -
|
||||
mv $TmpDir/lazarus.tgz $OutputFile
|
||||
echo "Created $OutputFile"
|
||||
rm -rf $TmpLazDir
|
||||
|
||||
# end.
|
||||
|
Loading…
Reference in New Issue
Block a user