Skip to content

Commit

Permalink
Removed target var #2213
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasdille committed Dec 22, 2023
1 parent 86052ab commit ebc9e23
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions tools/uidmap/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --from=build /opt/uidmap/ ${prefix}${target}/
COPY --from=build /opt/uidmap/ ${prefix}/
RUN <<EOF
chmod u+s "${prefix}${target}/bin/newuidmap"
chmod u+s "${prefix}${target}/bin/newgidmap"
chmod u+s "${prefix}/bin/newuidmap"
chmod u+s "${prefix}/bin/newgidmap"
EOF
4 changes: 2 additions & 2 deletions tools/umoci/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ARG name
ARG version
RUN <<EOF
check-github-release-asset "opencontainers/umoci" "v${version}" "umoci.${alt_arch}"
curl --silent --location --fail --output "${prefix}${target}/bin/umoci" \
curl --silent --location --fail --output "${prefix}/bin/umoci" \
"https://github.com/opencontainers/umoci/releases/download/v${version}/umoci.${alt_arch}"
chmod +x "${prefix}${target}/bin/umoci"
chmod +x "${prefix}/bin/umoci"
EOF
10 changes: 5 additions & 5 deletions tools/uniget/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ RUN <<EOF
check-github-release-asset "uniget-org/cli" "v${version}" "uniget_Linux_${arch}.tar.gz"
curl --silent --location --fail \
"https://github.com/uniget-org/cli/releases/download/v${version}/uniget_Linux_${arch}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin" --no-same-owner \
uniget
chmod +x "${prefix}${target}/bin/uniget"
chmod +x "${prefix}/bin/uniget"

"${prefix}${target}/bin/uniget" completion bash >"${prefix}${target}/share/bash-completion/completions/uniget"
"${prefix}${target}/bin/uniget" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/uniget.fish"
"${prefix}${target}/bin/uniget" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_uniget"
"${prefix}/bin/uniget" completion bash >"${prefix}/share/bash-completion/completions/uniget"
"${prefix}/bin/uniget" completion fish >"${prefix}/share/fish/vendor_completions.d/uniget.fish"
"${prefix}/bin/uniget" completion zsh >"${prefix}/share/zsh/vendor-completions/_uniget"
EOF
20 changes: 10 additions & 10 deletions tools/updatecli/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -26,24 +26,24 @@ echo " Using ${arch_suffix}"
check-github-release-asset "updatecli/updatecli" "v${version}" "updatecli_Linux_${arch_suffix}.tar.gz"

curl --silent --location --fail "https://github.com/updatecli/updatecli/releases/download/v${version}/updatecli_Linux_${arch_suffix}.tar.gz" \
| tar --extract --gzip --directory="${prefix}${target}/bin/" --no-same-owner \
| tar --extract --gzip --directory="${prefix}/bin/" --no-same-owner \
updatecli \
manpages \
completions

mv "${prefix}${target}/bin/manpages/updatecli.1.gz" "${prefix}${target}/share/man/man1/"
mv "${prefix}${target}/bin/completions/updatecli.bash" "${prefix}${target}/share/bash-completion/completions/updatecli"
mv "${prefix}${target}/bin/completions/updatecli.fish" "${prefix}${target}/share/fish/vendor_completions.d/updatecli.fish"
mv "${prefix}${target}/bin/completions/updatecli.zsh" "${prefix}${target}/share/zsh/vendor-completions/_updatecli"
mv "${prefix}/bin/manpages/updatecli.1.gz" "${prefix}/share/man/man1/"
mv "${prefix}/bin/completions/updatecli.bash" "${prefix}/share/bash-completion/completions/updatecli"
mv "${prefix}/bin/completions/updatecli.fish" "${prefix}/share/fish/vendor_completions.d/updatecli.fish"
mv "${prefix}/bin/completions/updatecli.zsh" "${prefix}/share/zsh/vendor-completions/_updatecli"

rmdir \
"${prefix}${target}/bin/manpages" \
"${prefix}${target}/bin/completions"
"${prefix}/bin/manpages" \
"${prefix}/bin/completions"
EOF

# completion
#RUN <<EOF
#"${prefix}${target}/bin/updatecli" completion bash >"${prefix}${target}/share/bash-completion/completions/updatecli"
#"${prefix}${target}/bin/updatecli" completion fish >"${prefix}${target}/share/fish/vendor_completions.d/updatecli.fish"
#"${prefix}${target}/bin/updatecli" completion zsh >"${prefix}${target}/share/zsh/vendor-completions/_updatecli"
#"${prefix}/bin/updatecli" completion bash >"${prefix}/share/bash-completion/completions/updatecli"
#"${prefix}/bin/updatecli" completion fish >"${prefix}/share/fish/vendor_completions.d/updatecli.fish"
#"${prefix}/bin/updatecli" completion zsh >"${prefix}/share/zsh/vendor-completions/_updatecli"
#EOF
4 changes: 2 additions & 2 deletions tools/upx/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ ARG version
RUN <<EOF
check-github-release-asset "upx/upx" "v${version}" "upx-${version}-${alt_arch}_linux.tar.xz"
curl --silent --location --fail "https://github.com/upx/upx/releases/download/v${version}/upx-${version}-${alt_arch}_linux.tar.xz" \
| tar --extract --xz --directory="${prefix}${target}/bin/" --strip-components=1 --no-same-owner \
| tar --extract --xz --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"upx-${version}-${alt_arch}_linux/upx" \
"upx-${version}-${alt_arch}_linux/upx.1"
mv "${prefix}${target}/bin/upx.1" "${prefix}${target}/share/man/man1/"
mv "${prefix}/bin/upx.1" "${prefix}/share/man/man1/"
EOF
2 changes: 1 addition & 1 deletion tools/util-linux/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,4 @@ COPY --from=ghcr.io/uniget-org/tools/uniget-build:latest \
SHELL [ "bash", "-clo", "errexit" ]
ARG name
ARG version
COPY --from=build /opt/util-linux/ ${prefix}${target}/
COPY --from=build /opt/util-linux/ ${prefix}/

0 comments on commit ebc9e23

Please sign in to comment.