Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm64版とAMD64版のdrawioが冗長にダウンロードされる。 #35

Open
suikan4github opened this issue Apr 14, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@suikan4github
Copy link
Owner

suikan4github commented Apr 14, 2024

drawioを取得する際、Arm64版とAMD64版を両方取得し、そのうちどちらをインストr−るするか決めている。これはバグではないしきちんと動作するが、あまりかっこ良くない。

また、何らかの事情でインストールスクリプトを2度走らせる場合、2回も律儀にダウンロードしている。wgetのオプションを利用して、ダウンロード済みのパッケージは再ダウンロードしないようにすべき。

@suikan4github suikan4github self-assigned this Apr 14, 2024
@suikan4github suikan4github added the enhancement New feature or request label Apr 14, 2024
@suikan4github suikan4github changed the title Arm64版とAMD64版のdrawioをいつもダウンロードする Arm64版とAMD64版のdrawioが冗長にダウンロードされる。 Apr 19, 2024
@suikan4github
Copy link
Owner Author

PaleALE/install

Lines 72 to 82 in 8259812

curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep '\.deb' | cut -d '"' -f 4 | wget -i -
# Install the appropriate file based on the architecture.
if $(arch | grep x86_64 > /dev/null); then
apt -f install -y ./drawio-amd64-*.deb
elif $(arch | grep aarch64 > /dev/null); then
apt -f install -y ./drawio-arm64-*.deb
else
echo Program logic error at Draw.IO installation.
exit 1
fi

を、こんな感じに変更する。

# Install the appropriate file based on the architecture. 
if $(arch | grep x86_64 > /dev/null); then
    curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep 'amd64*\.deb' | cut -d '"' -f 4 | wget -i -N -
    apt -f install -y ./drawio-amd64-*.deb
elif $(arch | grep aarch64 > /dev/null); then
    curl -s https://api.github.com/repos/jgraph/drawio-desktop/releases/latest | grep browser_download_url | grep 'arm64*\.deb' | cut -d '"' -f 4 | wget -i -N -
    apt -f install -y ./drawio-arm64-*.deb
else 
    echo Program logic error at Draw.IO installation.
    exit 1
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant