Skip to content

Commit

Permalink
Try to use a here-document
Browse files Browse the repository at this point in the history
  • Loading branch information
sounddrill31 authored Aug 4, 2024
1 parent 1f8c031 commit b6cf034
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 4 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,12 @@ jobs:
if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then
local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}"
local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST='mkdir -p .repo/local_manifests; rm -rf .repo/local_manifests/*; curl -o .repo/local_manifests/local_manifest.xml '"${local_manifest_url}"
export LOCAL_MANIFEST=$(cat <<EOF
mkdir -p .repo/local_manifests && \
rm -rf .repo/local_manifests/* && \
curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}"
EOF
)
else
export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${github.event.inputs.LOCAL_MANIFEST_BRANCH} local_manifests"
fi
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,12 @@ jobs:
if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then
local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}"
local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST='mkdir -p .repo/local_manifests; rm -rf .repo/local_manifests/*; curl -o .repo/local_manifests/local_manifest.xml '"${local_manifest_url}"
export LOCAL_MANIFEST=$(cat <<EOF
mkdir -p .repo/local_manifests && \
rm -rf .repo/local_manifests/* && \
curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}"
EOF
)
else
export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${github.event.inputs.LOCAL_MANIFEST_BRANCH} local_manifests"
fi
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/twrp-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ jobs:
if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then
local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}"
local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST='mkdir -p .repo/local_manifests; rm -rf .repo/local_manifests/*; curl -o .repo/local_manifests/local_manifest.xml '"${local_manifest_url}"
export LOCAL_MANIFEST=$(cat <<EOF
mkdir -p .repo/local_manifests && \
rm -rf .repo/local_manifests/* && \
curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}"
EOF
)
else
export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${github.event.inputs.LOCAL_MANIFEST_BRANCH} local_manifests"
fi
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/twrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ jobs:
if [[ "${{ github.event.inputs.LOCAL_MANIFEST }}" =~ \.xml(/)?$ ]]; then
local_manifest_url="${{ github.event.inputs.LOCAL_MANIFEST }}"
local_manifest_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST='mkdir -p .repo/local_manifests; rm -rf .repo/local_manifests/*; curl -o .repo/local_manifests/local_manifest.xml '"${local_manifest_url}"
export LOCAL_MANIFEST=$(cat <<EOF
mkdir -p .repo/local_manifests && \
rm -rf .repo/local_manifests/* && \
curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}"
EOF
)
else
export LOCAL_MANIFEST="git clone ${{ github.event.inputs.LOCAL_MANIFEST }} --depth 1 -b ${github.event.inputs.LOCAL_MANIFEST_BRANCH} local_manifests"
fi
Expand Down

0 comments on commit b6cf034

Please sign in to comment.