diff options
Diffstat (limited to 'projects/libreboot-release/install')
-rw-r--r-- | projects/libreboot-release/install/libreboot-release | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/projects/libreboot-release/install/libreboot-release b/projects/libreboot-release/install/libreboot-release index b916adac..58a384f0 100644 --- a/projects/libreboot-release/install/libreboot-release +++ b/projects/libreboot-release/install/libreboot-release @@ -27,18 +27,18 @@ SHA256SUM="sha256sum" ASC="asc" usage() { - printf "$executable [action] [projects...]\n" >&2 - - printf "\nActions:\n" >&2 - printf " download - Download project files\n" >&2 - printf " sources - Download project sources\n" >&2 - printf " verify - Verify project files\n" >&2 - printf " extract - Extract project files\n" >&2 - printf " prepare - Download, verify and extract project files\n" >&2 - - printf "\nEnvironment variables:\n" >&2 - printf " MACHINE - Machine architecture to use\n" >&2 - printf " DOWNLOAD_URL - Base URL to download files from\n" >&2 + printf '%s\n' "$executable [action] [projects...]" >&2 + + printf '\n%s\n' 'Actions:' >&2 + printf '%s\n' ' download - Download project files' >&2 + printf '%s\n' ' sources - Download project sources' >&2 + printf '%s\n' ' verify - Verify project files' >&2 + printf '%s\n' ' extract - Extract project files' >&2 + printf '%s\n' ' prepare - Download, verify and extract project files' >&2 + + printf '\n%s\n' 'Environment variables:' >&2 + printf '%s\n' ' MACHINE - Machine architecture to use' >&2 + printf '%s\n' ' DOWNLOAD_URL - Base URL to download files from' >&2 } download() { @@ -76,7 +76,7 @@ download() { wget -O "$path.$SHA256SUM" "$url.$SHA256SUM" wget -O "$path.$ASC" "$url.$ASC" - printf "\nDownloaded $project\n" + printf '\n%s\n' "Downloaded $project" return 0 fi @@ -85,7 +85,7 @@ download() { IFS=$ifs_save done - printf "Could not download $project from $DOWNLOAD_URL\n" >&2 + printf '%s\n' "Could not download $project from $DOWNLOAD_URL" >&2 return 1 } @@ -102,9 +102,9 @@ sources() { wget -O "$path.$SHA256SUM" "$url.$SHA256SUM" wget -O "$path.$ASC" "$url.$ASC" - printf "\nDownloaded $project sources\n" + printf '\n%s\n' "Downloaded $project sources" else - printf "Could not download $project sources from $DOWNLOAD_URL\n" >&2 + printf '%s\n' "Could not download $project sources from $DOWNLOAD_URL" >&2 return 1 fi @@ -153,17 +153,17 @@ verify() { sha256sum -c "$project.$TAR_XZ.$SHA256SUM" ) else - printf "Could not verify $project checksum!\n" >&2 + printf '%s\n' "Could not verify $project checksum!" >&2 fi if [ -f "$signature_path" ] then gpg --armor --verify "$signature_path" "$path" else - printf "Could not verify $project signature!\n" >&2 + printf '%s\n' "Could not verify $project signature!" >&2 fi - printf "\nVerified $project\n" + printf '\n%s\n' "Verified $project" return 0 done @@ -171,7 +171,7 @@ verify() { IFS=$ifs_save done - printf "Could not verify $project\n" >&2 + printf '%s\n' "Could not verify $project" >&2 return 1 } @@ -209,7 +209,7 @@ extract() { if [ "$prefix" = "$SYSTEMS/$MACHINE" ] then - printf "Skiping $project extract\n" + printf '%s\n' "Skiping $project extract" return 0 fi @@ -217,7 +217,7 @@ extract() { tar -xf "$path" -ps -C "$extract_path" - printf "Extracted $project\n" + printf '%s\n' "Extracted $project" return 0 done @@ -225,7 +225,7 @@ extract() { IFS=$ifs_save done - printf "Could not extract $project\n" >&2 + printf '%s\n' "Could not extract $project" >&2 return 1 } @@ -239,7 +239,7 @@ requirements() { if [ -z "$requirement_path" ] then - printf "Missing requirement: $requirement\n" >&2 + printf '%s\n' "Missing requirement: $requirement" >&2 exit 1 fi done @@ -256,7 +256,7 @@ setup() { if [ -z "$DOWNLOAD_URL" ] then - printf "Missing download URL\n" >&2 + printf '%s\n' 'Missing download URL' >&2 exit 1 fi } |