diff --git a/scripts/package b/scripts/package index c13be0703e79fc254f58c54c5d057b3bee7a73d2..8731205c55a28729ac0df585512ef69f56d064e1 100755 --- a/scripts/package +++ b/scripts/package @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh PKGNAME='ocs-url' @@ -10,7 +10,7 @@ PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)" BUILDDIR="${PROJDIR}/build_${PKGNAME}" -ci_ubuntu_deb() { # docker-image: ubuntu:14.04 +ubuntu_deb() { # docker-image: ubuntu:14.04 apt update -qq apt -y install curl git apt -y install build-essential qt5-default libqt5svg5-dev qtdeclarative5-dev @@ -34,7 +34,7 @@ build_ubuntu_deb() { 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 make automake gcc gcc-c++ libtool qt5-qtbase-devel qt5-qtsvg-devel qt5-qtdeclarative-devel yum -y install rpm-build @@ -57,7 +57,7 @@ build_fedora_rpm() { 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 install curl git 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() { 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 -S --noconfirm curl git pacman -S --noconfirm base-devel qt5-base qt5-svg qt5-declarative qt5-quickcontrols @@ -106,13 +106,13 @@ build_archlinux_pkg() { } export_srcarchive() { - if [[ "${1}" ]]; then + if [ "${1}" ]; then $(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${1}" HEAD) fi } transfer_file() { - if [[ -f "${1}" ]]; then + if [ -f "${1}" ]; then filename="$(basename "${1}")" transferlog="${PROJDIR}/transfer.log" echo "Uploading ${filename}" >> "${transferlog}" @@ -121,6 +121,6 @@ transfer_file() { fi } -if [[ "${1}" = 'ci_'* || "${1}" = 'build_'* ]]; then +if [ "${1}" ]; then ${1} fi