chore: Make curl commands clearer & more standardized
This commit is contained in:
parent
a31cc10aeb
commit
8f9255cacd
6 changed files with 9 additions and 9 deletions
|
|
@ -75,7 +75,7 @@ touch /.dockerenv
|
|||
|
||||
# Always install Brew
|
||||
echo "Downloading and installing Brew..."
|
||||
curl -sfLo /tmp/brew-install https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
|
||||
curl -fLs https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh -o /tmp/brew-install
|
||||
echo "Downloaded Brew install script"
|
||||
chmod +x /tmp/brew-install
|
||||
/tmp/brew-install
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ else
|
|||
echo "Checking if curl is installed and executable at /usr/bin/curl"
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
echo "Downloading chezmoi binary from the latest Github release"
|
||||
/usr/bin/curl -fLs https://github.com/twpayne/chezmoi/releases/latest/download/chezmoi-linux-amd64 -o /usr/bin/chezmoi
|
||||
/usr/bin/curl -fLs --create-dirs https://github.com/twpayne/chezmoi/releases/latest/download/chezmoi-linux-amd64 -o /usr/bin/chezmoi
|
||||
echo "Downloaded chezmoi binary and installed into /usr/bin"
|
||||
echo "Ensuring chezmoi is executable"
|
||||
/usr/bin/chmod 755 /usr/bin/chezmoi
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ for FONT in "${FONTS[@]}"; do
|
|||
if FILENAME=$(echo "${FILE_REF}" | jq -er '.filename' 2>/dev/null); then
|
||||
if URL=$(echo "${FILE_REF}" | jq -er '.url' 2>/dev/null); then
|
||||
echo "Downloading ${FILENAME} from ${URL}"
|
||||
curl "${URL}" -sfo "${DEST}/${FONT}/${FILENAME##*/}" # everything before the last / is removed to get the filename
|
||||
curl -fLs --create-dirs "${URL}" -o "${DEST}/${FONT}/${FILENAME##*/}" # everything before the last / is removed to get the filename
|
||||
echo "Downloaded ${FILENAME}"
|
||||
else
|
||||
echo "Failed to extract URLs for: ${FONT}" >&2
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ for FONT in "${FONTS[@]}"; do
|
|||
mkdir -p "${DEST}/${FONT}"
|
||||
|
||||
echo "Downloading ${FONT} from ${URL}/${FONT}.tar.xz"
|
||||
curl "${URL}/${FONT}.tar.xz" -sfL -o "/tmp/fonts/${FONT}.tar.xz"
|
||||
curl -fLs --create-dirs "${URL}/${FONT}.tar.xz" -o "/tmp/fonts/${FONT}.tar.xz"
|
||||
echo "Downloaded ${FONT}"
|
||||
|
||||
tar -xf "/tmp/fonts/${FONT}.tar.xz" -C "${DEST}/${FONT}"
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ if [[ ${#INSTALL[@]} -gt 0 ]]; then
|
|||
echo "Installing ${EXTENSION} Gnome extension with version ${VERSION}"
|
||||
# Download archive
|
||||
echo "Downloading ZIP archive ${URL}"
|
||||
curl -fs -o "${ARCHIVE_DIR}" "${URL}"
|
||||
curl -fLs --create-dirs "${URL}" -o "${ARCHIVE_DIR}"
|
||||
echo "Downloaded ZIP archive ${URL}"
|
||||
# Extract archive
|
||||
echo "Extracting ZIP archive"
|
||||
|
|
@ -185,7 +185,7 @@ if [[ ${#INSTALL[@]} -gt 0 ]] && ! "${LEGACY}"; then
|
|||
echo "Installing '${EXT_NAME}' Gnome extension with version ${SUITABLE_VERSION}"
|
||||
# Download archive
|
||||
echo "Downloading ZIP archive ${URL}"
|
||||
curl -fs -o "${ARCHIVE_DIR}" "${URL}"
|
||||
curl -fLs --create-dirs "${URL}" -o "${ARCHIVE_DIR}"
|
||||
echo "Downloaded ZIP archive ${URL}"
|
||||
# Extract archive
|
||||
echo "Extracting ZIP archive"
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ if [[ ${#REPOS[@]} -gt 0 ]]; then
|
|||
REPO_URL="${REPO//[$'\t\r\n ']}"
|
||||
|
||||
echo "Downloading repo file ${REPO_URL}"
|
||||
curl -fs --output-dir "/etc/yum.repos.d/" -O "${REPO_URL}"
|
||||
curl -fLs --create-dirs -O "${REPO_URL}" --output-dir "/etc/yum.repos.d/"
|
||||
echo "Downloaded repo file ${REPO_URL}"
|
||||
elif [[ "${REPO}" =~ ^https?:\/\/.* ]] && [[ "${REPO}" != "https://copr.fedorainfracloud.org/coprs/"* ]]; then
|
||||
REPO_URL="${REPO//[$'\t\r\n ']}"
|
||||
|
|
@ -23,7 +23,7 @@ if [[ ${#REPOS[@]} -gt 0 ]]; then
|
|||
CLEAN_REPO_NAME="${CLEAN_REPO_NAME//\//.}"
|
||||
|
||||
echo "Downloading repo file ${REPO_URL}"
|
||||
curl -fs -o "/etc/yum.repos.d/${CLEAN_REPO_NAME}" "${REPO_URL}"
|
||||
curl -fLs --create-dirs "${REPO_URL}" -o "/etc/yum.repos.d/${CLEAN_REPO_NAME}"
|
||||
echo "Downloaded repo file ${REPO_URL}"
|
||||
elif [[ ! "${REPO}" =~ ^https?:\/\/.* ]] && [[ "${REPO}" == *".repo" ]] && [[ -f "${CONFIG_DIRECTORY}/rpm-ostree/${REPO}" ]]; then
|
||||
cp "${CONFIG_DIRECTORY}/rpm-ostree/${REPO}" "/etc/yum.repos.d/${REPO##*/}"
|
||||
|
|
@ -170,7 +170,7 @@ if [[ ${#REPLACE[@]} -gt 0 ]]; then
|
|||
REPO_URL="${REPO//[$'\t\r\n ']}"
|
||||
|
||||
echo "Downloading repo file ${REPO_URL}"
|
||||
curl -fs --output-dir "/etc/yum.repos.d/" -O "${REPO_URL}"
|
||||
curl -fLs --create-dirs -O "${REPO_URL}" --output-dir "/etc/yum.repos.d/"
|
||||
echo "Downloaded repo file ${REPO_URL}"
|
||||
|
||||
rpm-ostree override replace --experimental --from "repo=copr:copr.fedorainfracloud.org:${MAINTAINER}:${REPO_NAME}" "${REPLACE_STR}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue