Skip to content

Commit

Permalink
Merge side-by-side double-quoted variables
Browse files Browse the repository at this point in the history
Signed-off-by: Ambre Austen Suhamy <[email protected]>
  • Loading branch information
ElectreAAS committed Jan 12, 2024
1 parent 395322d commit 394cc75
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/scripts/main/hygiene.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ case $GITHUB_EVENT_NAME in
CheckConfigure "$GITHUB_SHA"
;;
pull_request)
for commit in $(git rev-list "$BASE_REF_SHA"..."$PR_REF_SHA" --reverse)
for commit in $(git rev-list "$BASE_REF_SHA...$PR_REF_SHA" --reverse)
do
echo "check configure for $commit"
CheckConfigure "$commit"
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/main/ocaml-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ if [[ $OPAM_TEST -ne 1 ]] ; then
fi
fi

if ! ./configure --prefix "$PREFIX""$HOST" --with-vendored-deps "${CONFIGURE_SWITCHES:-}" ; then
if ! ./configure --prefix "$PREFIX$HOST" --with-vendored-deps "${CONFIGURE_SWITCHES:-}" ; then
echo
echo -e "[\e[31mERROR\e[0m] OCaml's configure script failed"
(set +x ; echo -en "::group::config.log contents\r") 2>/dev/null
Expand Down
4 changes: 2 additions & 2 deletions .github/scripts/main/preamble.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ init-bootstrap () {
export OPAMROOT=$OPAMBSROOT
# The system compiler will be picked up
if [ "${OPAM_REPO%.git}" != "${OPAM_REPO_MAIN%.git}" ]; then
opam init --no-setup git+$OPAM_REPO_MAIN#"$OPAM_REPO_SHA"
opam init --no-setup git+"$OPAM_REPO_MAIN#$OPAM_REPO_SHA"
else
opam init --no-setup git+"$OPAM_REPO_CACHE"#"$OPAM_REPO_SHA"
opam init --no-setup git+"$OPAM_REPO_CACHE#$OPAM_REPO_SHA"
fi

cat >> "$OPAMROOT"/config <<EOF
Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/main/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ fi
# The SHA is fixed so that upstream changes shouldn't affect CI. The SHA needs
# to be moved forwards when a new version of OCaml is added to ensure that the
# ocaml-system package is available at the correct version.
opam init --bare default git+"$OPAM_REPO_CACHE"#"$OPAM_TEST_REPO_SHA"
opam init --bare default git+"$OPAM_REPO_CACHE#$OPAM_TEST_REPO_SHA"
cat >> $(opam var root --global 2>/dev/null)/config <<EOF
archive-mirrors: "https://opam.ocaml.org/cache"
EOF
Expand Down
6 changes: 3 additions & 3 deletions shell/bootstrap-ocaml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ V=$(echo "${URL}"| sed -e 's|.*/\([^/]*\)\.tar\.gz|\1|')
FV_URL=$(sed -ne 's/URL_flexdll *= *//p' "$BOOTSTRAP_ROOT"/src_ext/Makefile | tr -d '\r')
FLEXDLL=$(echo "${FV_URL}"| sed -e 's|.*/\([^/]*\)|\1|')
if [ ! -e "${V}".tar.gz ]; then
cp "$BOOTSTRAP_ROOT"/src_ext/archives/"${V}".tar.gz . 2>/dev/null || ${CURL} "${URL}"
cp "$BOOTSTRAP_ROOT/src_ext/archives/${V}".tar.gz . 2>/dev/null || ${CURL} "${URL}"
fi

ACTUALMD5=$(openssl md5 "${V}".tar.gz 2> /dev/null | cut -f 2 -d ' ')
Expand Down Expand Up @@ -128,13 +128,13 @@ if [ -n "$1" ] && [ -n "${COMSPEC}" ] && [ -x "${COMSPEC}" ] ; then
fi
cd ..
if [ ! -e "${FLEXDLL}" ]; then
cp "$BOOTSTRAP_ROOT"/src_ext/archives/"${FLEXDLL}" . 2>/dev/null || ${CURL} "${FV_URL}"
cp "$BOOTSTRAP_ROOT/src_ext/archives/${FLEXDLL}" . 2>/dev/null || ${CURL} "${FV_URL}"
fi
cd "${V}"
PREFIX=$(cd .. ; pwd)/ocaml
WINPREFIX=$(echo "${PREFIX}" | cygpath -f - -m)
if [ "${GEN_CONFIG_ONLY}" -eq 0 ] ; then
tar -xzf "$BOOTSTRAP_ROOT"/"${FLEXDLL}"
tar -xzf "$BOOTSTRAP_ROOT/${FLEXDLL}"
rm -rf flexdll
mv flexdll-* flexdll
PATH="${PATH_PREPEND}${PREFIX}/bin:${PATH}" \
Expand Down
6 changes: 3 additions & 3 deletions shell/opam_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,11 @@ mkdir -p "$BINDIR" 2>/dev/null || true
if [ ! -w "$BINDIR" ]; then
echo "You don't have write access to $BINDIR: sudo may ask for your password"
if [ ! -d "$BINDIR" ]; then sudo mkdir -p "$BINDIR"; fi
sudo install -g root -o root -m 755 "$TMP"/"$file" "$BINDIR"/opam
sudo install -g root -o root -m 755 "$TMP/$file" "$BINDIR"/opam
else
install -m 755 "$TMP"/"$file" "$BINDIR"/opam
install -m 755 "$TMP/$file" "$BINDIR"/opam
fi
rm -f "$TMP"/"$file"
rm -f "$TMP/$file"

OPAM=$(which opam || echo "$BINDIR/opam")
if [ "$OPAM" != "$BINDIR/opam" ]; then
Expand Down
10 changes: 5 additions & 5 deletions shell/re-patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ for package in $(cd patches ; find . -maxdepth 1 -mindepth 1 -type d | sed -e 's
# Re-do the patches
for mode in $modes ; do
# Extract the package in this mode
make "$package"."$mode"
make "$package.$mode"
rm -rf "$package"
if [[ -e $package.tar.gz ]] ; then
tarball=$package.tar.gz
Expand All @@ -47,9 +47,9 @@ for package in $(cd patches ; find . -maxdepth 1 -mindepth 1 -type d | sed -e 's
tarball=$package.tbz
tar_flag=j
fi
rm -rf tmp-"$package"."$mode"
mkdir tmp-"$package"."$mode"
cd tmp-"$package"."$mode"
rm -rf tmp-"$package.$mode"
mkdir tmp-"$package.$mode"
cd tmp-"$package.$mode"
tar -x$tar_flag -f ../"$tarball"
while IFS= read -r -d '' dir ; do
if [[ $dir = "." || $dir = ".." ]] ; then continue ; fi
Expand Down Expand Up @@ -80,6 +80,6 @@ for package in $(cd patches ; find . -maxdepth 1 -mindepth 1 -type d | sed -e 's
done

cd ..
rm -rf tmp-"$package"."$mode"
rm -rf tmp-"$package.$mode"
done
done
4 changes: 2 additions & 2 deletions src_ext/update-sources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ while read -r name prefix version url; do
esac
latest=$(opam show "$package" -f all-versions | sed -e 's/ base//')
latest=${latest##* }
package_url=$(opam show "$package"."$latest" -f url.src: | sed -e 's/"//g')
package_url=$(opam show "$package.$latest" -f url.src: | sed -e 's/"//g')
md5=$(sed -n -e "s/MD5$prefix$name *= *\(.*\)/\1/p" Makefile.sources)
package_md5=$(opam show "$package"."$latest" -f url.checksum: | sed -n -e "/md5/s/.*md5=\([a-fA-F0-9]\{32\}\).*/\1/p")
package_md5=$(opam show "$package.$latest" -f url.checksum: | sed -n -e "/md5/s/.*md5=\([a-fA-F0-9]\{32\}\).*/\1/p")
if [[ -z $package_md5 ]] ; then
echo -e "\n$name: [\033[1;33mWARN\033[m] no md5 given in opam, downloading $package_url to check"
package_md5=$(curl -LSs "$package_url" | md5sum | cut -f1 -d' ')
Expand Down

0 comments on commit 394cc75

Please sign in to comment.