Skip to content
Snippets Groups Projects
Commit fa06ce42 authored by akiraohgaki's avatar akiraohgaki
Browse files

Update package script

parent c471e756
No related branches found
No related tags found
No related merge requests found
#!/bin/bash #!/bin/sh
PKGNAME='ocs-url' PKGNAME='ocs-url'
...@@ -10,7 +10,7 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)" ...@@ -10,7 +10,7 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDDIR="${PROJDIR}/build_${PKGNAME}" BUILDDIR="${PROJDIR}/build_${PKGNAME}"
ci_ubuntu_deb() { # docker-image: ubuntu:14.04 ubuntu_deb() { # docker-image: ubuntu:14.04
apt update -qq apt update -qq
apt -y install curl git apt -y install curl git
apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev
...@@ -34,7 +34,7 @@ build_ubuntu_deb() { ...@@ -34,7 +34,7 @@ build_ubuntu_deb() {
debuild -uc -us -b debuild -uc -us -b
} }
ci_fedora_rpm() { # docker-image: fedora:20 fedora_rpm() { # docker-image: fedora:20
yum -y install curl git yum -y install curl git
yum -y install make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel yum -y install make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel
yum -y install rpm-build yum -y install rpm-build
...@@ -57,7 +57,7 @@ build_fedora_rpm() { ...@@ -57,7 +57,7 @@ build_fedora_rpm() {
rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec" rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec"
} }
ci_opensuse_rpm() { # docker-image: opensuse:42.1 opensuse_rpm() { # docker-image: opensuse:42.1
zypper --non-interactive refresh zypper --non-interactive refresh
zypper --non-interactive install curl git zypper --non-interactive install curl git
zypper --non-interactive install make automake gcc gcc-c++ libtool libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qtdeclarative-devel zypper --non-interactive install make automake gcc gcc-c++ libtool libqt5-qtbase-devel libqt5-qtsvg-devel libqt5-qtdeclarative-devel
...@@ -81,7 +81,7 @@ build_opensuse_rpm() { ...@@ -81,7 +81,7 @@ build_opensuse_rpm() {
rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec" rpmbuild --define "_topdir ${BUILDDIR}" -bb "${BUILDDIR}/SPECS/${PKGNAME}.spec"
} }
ci_archlinux_pkg() { # docker-image: base/archlinux:latest archlinux_pkg() { # docker-image: base/archlinux:latest
pacman -Syu --noconfirm pacman -Syu --noconfirm
pacman -S --noconfirm curl git pacman -S --noconfirm curl git
pacman -S --noconfirm base-devel qt5-base qt5-svg qt5-declarative qt5-quickcontrols pacman -S --noconfirm base-devel qt5-base qt5-svg qt5-declarative qt5-quickcontrols
...@@ -106,13 +106,13 @@ build_archlinux_pkg() { ...@@ -106,13 +106,13 @@ build_archlinux_pkg() {
} }
export_srcarchive() { export_srcarchive() {
if [[ "${1}" ]]; then if [ "${1}" ]; then
$(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${1}" HEAD) $(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${1}" HEAD)
fi fi
} }
transfer_file() { transfer_file() {
if [[ -f "${1}" ]]; then if [ -f "${1}" ]; then
filename="$(basename "${1}")" filename="$(basename "${1}")"
transferlog="${PROJDIR}/transfer.log" transferlog="${PROJDIR}/transfer.log"
echo "Uploading ${filename}" >> "${transferlog}" echo "Uploading ${filename}" >> "${transferlog}"
...@@ -121,6 +121,6 @@ transfer_file() { ...@@ -121,6 +121,6 @@ transfer_file() {
fi fi
} }
if [[ "${1}" = 'ci_'* || "${1}" = 'build_'* ]]; then if [ "${1}" ]; then
${1} ${1}
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment