Support cargo-deb

This commit is contained in:
Taiki Endo
2026-04-05 17:16:30 +09:00
parent 7a562dfa95
commit 55a981690b
6 changed files with 73 additions and 0 deletions

17
main.sh
View File

@@ -161,6 +161,17 @@ download_and_extract() {
esac
fi
;;
*.deb)
if ! type -P dpkg-deb >/dev/null; then
case "${base_distro}" in
debian | fedora | suse | arch | alpine)
printf '::group::Install packages required for installation (dpkg)\n'
sys_install dpkg
printf '::endgroup::\n'
;;
esac
fi
;;
esac
mkdir -p -- "${tmp_dir}"
@@ -194,6 +205,12 @@ download_and_extract() {
mv -- "${tmp}" "${bin_dir}/"
done
;;
*.deb)
dpkg-deb -x tmp .
for tmp in "${bin_in_archive[@]}"; do
mv -- "${tmp}" "${bin_dir}/"
done
;;
*)
for tmp in "${installed_bin[@]}"; do
mv -- tmp "${tmp}"