mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-25 06:19:52 +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
|
# Author: Mattias Gaertner
|
||||||
#
|
#
|
||||||
# Usage: ./create_lazarus_export_tgz.sh [chmhelp] [download] outputfilename
|
# Usage: ./create_lazarus_export_tgz.sh [chmhelp] [download] outputfilename.tgz
|
||||||
#
|
#
|
||||||
# Options:
|
# Options:
|
||||||
# chmhelp add chm,kwd files in docs/chm
|
|
||||||
# download download instead of using the current files
|
# 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=
|
Download=
|
||||||
UseCHMHelp=
|
UseCHMHelp=
|
||||||
OutputFile=
|
OutputFile=
|
||||||
TmpDir=~/tmp
|
TmpDir=~/tmp
|
||||||
|
Pas2jsZip=
|
||||||
|
|
||||||
LastParam=
|
LastParam=
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
echo "param=$1"
|
echo "param=$1"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
download)
|
||||||
|
Download=yes
|
||||||
|
;;
|
||||||
chmhelp)
|
chmhelp)
|
||||||
echo "using files in docs/chm"
|
echo "using files in docs/chm"
|
||||||
UseCHMHelp=1
|
UseCHMHelp=1
|
||||||
;;
|
;;
|
||||||
download)
|
pas2jszip)
|
||||||
Download=yes
|
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
|
set -e
|
||||||
|
|
||||||
if [ "x$OutputFile" = "x" ]; then
|
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
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -71,6 +90,19 @@ else
|
|||||||
fi
|
fi
|
||||||
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
|
# add ide/revision.inc
|
||||||
echo "const RevisionStr = '$Revision';" > $TmpLazDir/ide/revision.inc
|
echo "const RevisionStr = '$Revision';" > $TmpLazDir/ide/revision.inc
|
||||||
|
|
||||||
@ -79,6 +111,7 @@ echo "packing ..."
|
|||||||
tar cvzf lazarus.tgz lazarus
|
tar cvzf lazarus.tgz lazarus
|
||||||
cd -
|
cd -
|
||||||
mv $TmpDir/lazarus.tgz $OutputFile
|
mv $TmpDir/lazarus.tgz $OutputFile
|
||||||
|
echo "Created $OutputFile"
|
||||||
rm -rf $TmpLazDir
|
rm -rf $TmpLazDir
|
||||||
|
|
||||||
# end.
|
# end.
|
||||||
|
Loading…
Reference in New Issue
Block a user