Skip to content

Commit

Permalink
Export the previous variable and fix the rm command
Browse files Browse the repository at this point in the history
  • Loading branch information
sounddrill31 authored Aug 4, 2024
1 parent 6ef0b2b commit 1823de1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ jobs:
#copy from here
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_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}")
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
4 changes: 2 additions & 2 deletions .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ 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_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}")
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
4 changes: 2 additions & 2 deletions .github/workflows/twrp-legacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ 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_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}")
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
4 changes: 2 additions & 2 deletions .github/workflows/twrp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ 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_url="${local_manifest_url%/}" # remove trailing slash if it exists
export LOCAL_MANIFEST=$(mkdir -p .repo/local_manifests && rm -rf .repo/local_manifests/* || true && curl -o .repo/local_manifests/local_manifest.xml "${local_manifest_url}")
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 1823de1

Please sign in to comment.