diff options
author | Serge Schneider <[email protected]> | 2018-03-02 20:08:24 +0000 |
---|---|---|
committer | Serge Schneider <[email protected]> | 2018-03-13 12:50:50 +0000 |
commit | ff2d5edee18efbb7ba2498e5bf8d308c186c4866 (patch) | |
tree | 380dd4fb8138fcbcf374839a880deb3191ca0725 /export-noobs/00-release/00-run.sh | |
parent | 56da271499afe7ae8e35a8fd30f04135283b2fb0 (diff) |
shellcheck
Diffstat (limited to 'export-noobs/00-release/00-run.sh')
-rwxr-xr-x | export-noobs/00-release/00-run.sh | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/export-noobs/00-release/00-run.sh b/export-noobs/00-release/00-run.sh index 25f62fd..5874944 100755 --- a/export-noobs/00-release/00-run.sh +++ b/export-noobs/00-release/00-run.sh @@ -2,35 +2,35 @@ NOOBS_DIR="${STAGE_WORK_DIR}/${IMG_DATE}-${IMG_NAME}${IMG_SUFFIX}" -install -v -m 744 files/partition_setup.sh ${NOOBS_DIR}/ -install -v files/partitions.json ${NOOBS_DIR}/ -install -v files/os.json ${NOOBS_DIR}/ -install -v files/OS.png ${NOOBS_DIR}/ -install -v files/release_notes.txt ${NOOBS_DIR}/ +install -v -m 744 files/partition_setup.sh "${NOOBS_DIR}/" +install -v files/partitions.json "${NOOBS_DIR}/" +install -v files/os.json "${NOOBS_DIR}/" +install -v files/OS.png "${NOOBS_DIR}/" +install -v files/release_notes.txt "${NOOBS_DIR}/" -tar -v -c -C files/marketing -f ${NOOBS_DIR}/marketing.tar . +tar -v -c -C files/marketing -f "${NOOBS_DIR}/marketing.tar" . -BOOT_SIZE=$(xz --robot -l ${NOOBS_DIR}/boot.tar.xz | grep totals | cut -f 5) -ROOT_SIZE=$(xz --robot -l ${NOOBS_DIR}/root.tar.xz | grep totals | cut -f 5) +BOOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/boot.tar.xz" | grep totals | cut -f 5)" +ROOT_SIZE="$(xz --robot -l "${NOOBS_DIR}/root.tar.xz" | grep totals | cut -f 5)" -BOOT_SIZE=$(expr ${BOOT_SIZE} / 1000000 \+ 1) -ROOT_SIZE=$(expr ${ROOT_SIZE} / 1000000 \+ 1) +BOOT_SIZE="$(( BOOT_SIZE / 1000000 + 1))" +ROOT_SIZE="$(( ROOT_SIZE / 1000000 + 1))" -BOOT_NOM=$(expr ${BOOT_SIZE} \* 3) -ROOT_NOM=$(expr ${ROOT_SIZE} \+ 400) +BOOT_NOM="$(( BOOT_SIZE * 3 ))" +ROOT_NOM="$(( ROOT_SIZE + 400 ))" -mv "${NOOBS_DIR}/OS.png" "${NOOBS_DIR}/$(echo ${NOOBS_NAME} | sed 's/ /_/g').png" +mv "${NOOBS_DIR}/OS.png" "${NOOBS_DIR}/${NOOBS_NAME// /_}.png" -sed ${NOOBS_DIR}/partitions.json -i -e "s|BOOT_SIZE|${BOOT_SIZE}|" -sed ${NOOBS_DIR}/partitions.json -i -e "s|ROOT_SIZE|${ROOT_SIZE}|" +sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_SIZE|${BOOT_SIZE}|" +sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_SIZE|${ROOT_SIZE}|" -sed ${NOOBS_DIR}/partitions.json -i -e "s|BOOT_NOM|${BOOT_NOM}|" -sed ${NOOBS_DIR}/partitions.json -i -e "s|ROOT_NOM|${ROOT_NOM}|" +sed "${NOOBS_DIR}/partitions.json" -i -e "s|BOOT_NOM|${BOOT_NOM}|" +sed "${NOOBS_DIR}/partitions.json" -i -e "s|ROOT_NOM|${ROOT_NOM}|" -sed ${NOOBS_DIR}/os.json -i -e "s|UNRELEASED|${IMG_DATE}|" -sed ${NOOBS_DIR}/os.json -i -e "s|NOOBS_NAME|${NOOBS_NAME}|" -sed ${NOOBS_DIR}/os.json -i -e "s|NOOBS_DESCRIPTION|${NOOBS_DESCRIPTION}|" +sed "${NOOBS_DIR}/os.json" -i -e "s|UNRELEASED|${IMG_DATE}|" +sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_NAME|${NOOBS_NAME}|" +sed "${NOOBS_DIR}/os.json" -i -e "s|NOOBS_DESCRIPTION|${NOOBS_DESCRIPTION}|" -sed ${NOOBS_DIR}/release_notes.txt -i -e "s|UNRELEASED|${IMG_DATE}|" +sed "${NOOBS_DIR}/release_notes.txt" -i -e "s|UNRELEASED|${IMG_DATE}|" -cp -a ${NOOBS_DIR} ${DEPLOY_DIR}/ +cp -a "${NOOBS_DIR}" "${DEPLOY_DIR}/" |