Skip to content

Commit

Permalink
assets: update_mirror.sh: Usage prints help about environment variables
Browse files Browse the repository at this point in the history
Users can find the information more easily than comments in the script.

Signed-off-by: Kazuhiro Hayashi <kazuhiro3.hayashi@toshiba.co.jp>
  • Loading branch information
zuka0828 authored and urpylka committed Sep 17, 2021
1 parent 2bdfa57 commit 0d840cd
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions assets/update_mirror.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ ARCH=armhf
usage()
{
echo "usage: update-mirror.sh -u ${UPSTREAM_URL} -r ${REPO} -d ${DISTS} -c ${COMPONENTS} -a ${ARCH}"
echo "For additional aptly options you can set the following environment variables"
echo " MIRROR_CREATE_OPTS: extra options for 'aptly mirror create' (e.g.,-filter=busybox -with-sources)"
echo " PUBLISH_SWITCH_OPTS: extra options for 'aptly publish switch' (e.g.,-skip-contents)"
echo " PUBLISH_SNAPSHOT_OPTS: extra options for 'aptly publish snapshot' (e.g.,-skip-contents)"
}

while [ "${1}" != "" ]; do
Expand Down Expand Up @@ -84,12 +88,6 @@ while [ "${1}" != "" ]; do
shift
done

# You can specify common options for each aptly command if you need,
# using the following variables.
# MIRROR_CREATE_OPTS="-filter=busybox -with-sources"
# PUBLISH_SWITCH_OPTS="-skip-contents"
# PUBLISH_SNAPSHOT_OPTS="-skip-contents"

# Create the mirror repository, if it doesn't exist
set +e
for dist in ${DISTS[@]}; do
Expand Down

0 comments on commit 0d840cd

Please sign in to comment.