mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-08 14:52:42 +02:00
52 lines
907 B
Bash
Executable File
52 lines
907 B
Bash
Executable File
#!/bin/bash
|
|
|
|
#set -x
|
|
set -e
|
|
|
|
OutputFile=$1
|
|
Usage="$0 [download] outputfilename"
|
|
TmpDir=~/tmp
|
|
|
|
Download=no
|
|
if [ "x$1" = "xdownload" ]; then
|
|
Download=yes
|
|
shift
|
|
fi
|
|
|
|
if [ "x$OutputFile" = "x" ]; then
|
|
echo $Usage
|
|
exit
|
|
fi
|
|
|
|
TmpLazDir=$TmpDir/lazarus
|
|
mkdir -p $TmpDir
|
|
rm -rf $TmpLazDir
|
|
if [ "x$Download" = "xyes" ]; then
|
|
echo "downloading lazarus svn ..."
|
|
mkdir -p $TmpLazDir
|
|
Revision=Exported
|
|
cd $TmpDir
|
|
svn export http://svn.freepascal.org/svn/lazarus/trunk $TmpLazDir
|
|
cd -
|
|
else
|
|
echo "extracting lazarus from local svn ..."
|
|
SourceDir=$(pwd | sed -e 's#/tools/install.*$##')
|
|
Revision=$(svnversion $SourceDir)
|
|
cd $TmpDir
|
|
svn export $SourceDir $TmpLazDir
|
|
cd -
|
|
fi
|
|
|
|
# add ide/revision.inc
|
|
echo "const RevisionStr = '$Revision';" > $TmpLazDir/ide/revision.inc
|
|
|
|
cd $TmpDir
|
|
echo "packing ..."
|
|
tar cvzf lazarus.tgz lazarus
|
|
cd -
|
|
mv $TmpDir/lazarus.tgz $OutputFile
|
|
rm -rf $TmpLazDir
|
|
|
|
# end.
|
|
|