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. # Copyright (C) 2016-2021 Savoir-faire Linux Inc.
# #
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
# #
# This script syncs and deploys packages from packages/distro. # 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 # Exit immediately if a command exits with a non-zero status
...@@ -47,6 +47,11 @@ function fetch_qt_deb() ...@@ -47,6 +47,11 @@ function fetch_qt_deb()
${DISTRIBUTION_REPOSITORY_FOLDER}_qt/ ${DISTRIBUTION_REPOSITORY_FOLDER}_qt/
} }
# True if $DISTRIBUTION ends by _qt
is_distribution_qt() {
[[ $DISTRIBUTION =~ _qt$ ]]
}
function package_deb() function package_deb()
{ {
DISTRIBUTION_REPOSITORY_FOLDER=$(realpath repositories)/${DISTRIBUTION} DISTRIBUTION_REPOSITORY_FOLDER=$(realpath repositories)/${DISTRIBUTION}
...@@ -56,12 +61,9 @@ function package_deb() ...@@ -56,12 +61,9 @@ function package_deb()
########################################################### ###########################################################
## fetch qt deb (if not currently building a qt package) ## ## fetch qt deb (if not currently building a qt package) ##
########################################################### ###########################################################
case "${DISTRIBUTION}" in if ! is_distribution_qt; then
*_qt) ;;
*)
fetch_qt_deb fetch_qt_deb
;; fi
esac
################################################## ##################################################
## Create local repository for the given distro ## ## Create local repository for the given distro ##
...@@ -96,12 +98,10 @@ EOF ...@@ -96,12 +98,10 @@ EOF
## Add packages to the repository ## ## Add packages to the repository ##
#################################### ####################################
packages="packages/${DISTRIBUTION}*/*.deb" packages="packages/${DISTRIBUTION}*/*.deb"
case "${DISTRIBUTION}" in if ! is_distribution_qt; then
*_qt) ;; packages+=" ${DISTRIBUTION_REPOSITORY_FOLDER}_qt/*.deb"
*) fi
packages="${packages} ${DISTRIBUTION_REPOSITORY_FOLDER}_qt/*.deb"
;;
esac
for package in ${packages}; do for package in ${packages}; do
# Sign the deb # Sign the deb
echo "## signing: ${package} ##" echo "## signing: ${package} ##"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment