Skip to content
Snippets Groups Projects
Unverified Commit 98b22dff authored by Maxim Cournoyer's avatar Maxim Cournoyer Committed by Maxim Cournoyer
Browse files

maint: Fix typos, shebang and simplify a conditional.

* scripts/deploy-packages.sh: Use /usr/bin/env as the shebang as it is
more susceptible to work on all systems (e.g. Guix System).  Fix typo
in header comment.
(package_deb) [qt]: Use a Bash regexp test and an if instead of a case.

Change-Id: Ifa986ddb3bcbea8bacc6af8e510dc64b938588f4
parent c20cb478
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2016-2021 Savoir-faire Linux Inc.
#
......@@ -21,7 +21,7 @@
#
# This script syncs and deploys packages from packages/distro.
# It should be ran from the project root directory.
# It should be run from the project root directory.
#
# Exit immediately if a command exits with a non-zero status
......@@ -47,6 +47,11 @@ function fetch_qt_deb()
${DISTRIBUTION_REPOSITORY_FOLDER}_qt/
}
# True if $DISTRIBUTION ends by _qt
is_distribution_qt() {
[[ $DISTRIBUTION =~ _qt$ ]]
}
function package_deb()
{
DISTRIBUTION_REPOSITORY_FOLDER=$(realpath repositories)/${DISTRIBUTION}
......@@ -56,12 +61,9 @@ function package_deb()
###########################################################
## fetch qt deb (if not currently building a qt package) ##
###########################################################
case "${DISTRIBUTION}" in
*_qt) ;;
*)
fetch_qt_deb
;;
esac
if ! is_distribution_qt; then
fetch_qt_deb
fi
##################################################
## Create local repository for the given distro ##
......@@ -96,12 +98,10 @@ EOF
## Add packages to the repository ##
####################################
packages="packages/${DISTRIBUTION}*/*.deb"
case "${DISTRIBUTION}" in
*_qt) ;;
*)
packages="${packages} ${DISTRIBUTION_REPOSITORY_FOLDER}_qt/*.deb"
;;
esac
if ! is_distribution_qt; then
packages+=" ${DISTRIBUTION_REPOSITORY_FOLDER}_qt/*.deb"
fi
for package in ${packages}; do
# Sign the deb
echo "## signing: ${package} ##"
......
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