forked from sig_core/toolkit
fixup shellcheck
This commit is contained in:
parent
2afb5e7c1c
commit
683c8d505f
@ -11,7 +11,7 @@ USAGE="usage: $NAME <torrentdir>"
|
|||||||
ISODIR=${1}
|
ISODIR=${1}
|
||||||
|
|
||||||
if [[ -z "${ISODIR}" || $# == 0 ]]; then
|
if [[ -z "${ISODIR}" || $# == 0 ]]; then
|
||||||
echo $USAGE
|
echo "$USAGE"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ if [ -f "$LOCKFILE" ]; then
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap "rm -f $LOCKFILE" EXIT
|
trap 'rm -f $LOCKFILE' EXIT
|
||||||
touch $LOCKFILE
|
touch $LOCKFILE
|
||||||
|
|
||||||
# stamp the email
|
# stamp the email
|
||||||
@ -63,25 +63,26 @@ for variant in "${VARIANTS[@]}"; do
|
|||||||
|
|
||||||
printf "** Linking Version: %s; Arch: %s; Variant: %s\n" "${REVISION}" "${arch}" "${variant}"
|
printf "** Linking Version: %s; Arch: %s; Variant: %s\n" "${REVISION}" "${arch}" "${variant}"
|
||||||
ln -sv \
|
ln -sv \
|
||||||
${ISODIR}/${arch}/{CHECKSUM*,${name_template}.iso*} \
|
"${ISODIR}"/"${arch}"/{CHECKSUM*,"${name_template}".iso*} \
|
||||||
${name_template}/
|
"${name_template}"/
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
printf "* Step 2: Generate torrents\n"
|
printf "* Step 2: Generate torrents\n"
|
||||||
for torrent_directory in ${TORRENT_DOWNLOAD_DIR}/Rocky-${REVISION}-*; do
|
for torrent_directory in "${TORRENT_DOWNLOAD_DIR}"/Rocky-"${REVISION}"-*; do
|
||||||
name="$(basename "${torrent_directory}")"
|
name="$(basename "${torrent_directory}")"
|
||||||
|
|
||||||
if [[ -d "${torrent_directory}" ]]; then
|
if [[ -d "${torrent_directory}" ]]; then
|
||||||
printf "** Creating torrent for ${torrent_directory}\n"
|
printf "** Creating torrent for %s\n" "${torrent_directory}"
|
||||||
else
|
else
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
torrenttools create \
|
|
||||||
--announce "${TORRENT_TRACKERS[@]}" --name "${name}" \
|
torrenttools create \
|
||||||
--exclude "${TORRENT_EXCLUDES}" --output "${TORRENT_START_DIR}" \
|
--announce "${TORRENT_TRACKERS[@]}" --name "${name}" \
|
||||||
--threads "${THREADS}" --comment "${TORRENT_COMMENT}" \
|
--exclude "${TORRENT_EXCLUDES}" --output "${TORRENT_START_DIR}" \
|
||||||
|
--threads "${THREADS}" --comment "${TORRENT_COMMENT}" \
|
||||||
"${torrent_directory}"
|
"${torrent_directory}"
|
||||||
res=$?
|
res=$?
|
||||||
if [[ $res -ne 0 ]]; then
|
if [[ $res -ne 0 ]]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user