slackbuilder/scripts/ioncube.sh
2020-12-09 18:28:42 +01:00

44 lines
1.5 KiB
Bash
Executable File

#!/bin/bash
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
VERSION=${VERSION:-10.3.9}
set -e
wget http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86_${VERSION}.tar.gz \
http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_${VERSION}.tar.gz
CHECKSUM32="`md5sum ioncube_loaders_lin_x86_${VERSION}.tar.gz | cut -d ' ' -f 1`"
CHECKSUM64="`md5sum ioncube_loaders_lin_x86-64_${VERSION}.tar.gz | cut -d ' ' -f 1`"
mv ioncube_loaders_lin_x86_${VERSION}.tar.gz \
ioncube_loaders_lin_x86-64_${VERSION}.tar.gz \
slackbuilds/development/ioncube-loader/
cat <<EOF > slackbuilds/development/ioncube-loader/ioncube-loader.info
PRGNAM="ioncube-loader"
VERSION="$VERSION"
HOMEPAGE="https://www.ioncube.com"
DOWNLOAD="http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86_${VERSION}.tar.gz"
MD5SUM="$CHECKSUM32"
DOWNLOAD_x86_64="http://downloads3.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_${VERSION}.tar.gz"
MD5SUM_x86_64="$CHECKSUM64"
REQUIRES=""
MAINTAINER="Eugene Wissner"
EMAIL="belka@caraus.de"
EOF
sed -i "s#^\(VERSION=\)\${VERSION:-.\+#\1\${VERSION:-$VERSION}#" slackbuilds/development/ioncube-loader/ioncube-loader.SlackBuild
BRANCH="ioncube${VERSION//.}"
cd slackbuilds
git checkout master
git checkout -b $BRANCH
git add development/ioncube-loader
git commit -m "development/ioncube-loader: Updated for version ${VERSION}"
git push origin $BRANCH