summaryrefslogtreecommitdiff
path: root/bibisect/buildReleasesRepository.sh
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2019-10-24 18:29:42 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2019-10-24 18:31:39 +0200
commit5a3acd7cc75c293bc4b67204df48b92e64c3852c (patch)
treec2e532b3e9212709fbafc52da1ef68205f28e3a9 /bibisect/buildReleasesRepository.sh
parentebcf0a907b22ffcb26be6a6756e7882e63293cdb (diff)
Add script for building bibisect-linux-64-releases
Previously, it was located in the redmine ticket < https://redmine.documentfoundation.org/issues/1481 >
Diffstat (limited to 'bibisect/buildReleasesRepository.sh')
-rwxr-xr-xbibisect/buildReleasesRepository.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/bibisect/buildReleasesRepository.sh b/bibisect/buildReleasesRepository.sh
new file mode 100755
index 0000000..c4a4f84
--- /dev/null
+++ b/bibisect/buildReleasesRepository.sh
@@ -0,0 +1,61 @@
+#!/bin/bash
+
+#Sample: ./buildReleasesRepository.sh 6.3.0.0.alpha1 6.3.0.0.beta1 6.3.0.0.beta2 6.3.0.1 6.3.0.2 6.3.0.3 6.3.0.4
+
+#Path to the folder where the tar.gz files are downloaded
+rootDir=
+
+#Path to the folder where 'bibisect-linux-64-releases' is
+targetDir=
+
+for var in "$@"
+do
+ date
+ cd $rootDir
+ input=$var
+ if [[ $input = *"alpha"* || $input = *"beta"* ]]; then
+ name="LibreOfficeDev_${input}_Linux_x86-64_deb"
+ folder="libreofficedev"${input::3}
+ else
+ name="LibreOffice_${input}_Linux_x86-64_deb"
+ folder="libreoffice"${input::3}
+ fi
+ file=${name}.tar.gz
+ if [ ! -f $rootDir/$file ]; then
+ echo "File $rootDir/$file not found!"
+ url="https://downloadarchive.documentfoundation.org/libreoffice/old/${input}/deb/x86_64/${file}"
+ echo "*** Downloading "
+ wget -c ${url} -O $rootDir/${file}.tmp
+ mv $rootDir/${file}.tmp $rootDir/${file}
+ fi
+ echo "*** Uncompressing file"
+ tar -xvzf $rootDir/${file}
+ echo "*** Uncompressing debs"
+ for i in $rootDir/$name/DEBS/*.deb; do dpkg-deb -x $i $rootDir/$name/DEBS/ ; done
+ echo "*** Moving files to opt/"
+ mv $rootDir/$name/DEBS/opt/$folder/* $rootDir/$name/DEBS/opt/
+ rm -r $rootDir/$name/DEBS/opt/$folder
+ rm $rootDir/$name/DEBS/*.deb
+ echo "*** Moving files to bibisect/"
+ cd ${targetDir}
+ git rm -r opt/
+ cd $rootDir
+ cp -rf $rootDir/$name/DEBS/* ${targetDir}/
+ echo "*** Removing files in origin"
+ rm -rf $name
+ cd ${targetDir}
+ par1=libreoffice-$input
+ echo "*** Creating commit $par1"
+ git add opt/
+ git commit . -m $par1 -m $file
+ git clean -ffxd
+ git tag -d $par1
+ git tag -a $par1 -m $par1
+done
+
+
+
+
+
+
+