-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathastahpro.sh
More file actions
48 lines (43 loc) · 1.31 KB
/
Copy pathastahpro.sh
File metadata and controls
48 lines (43 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
# name: Astah Pro
# version: 1.0
# description: astapro_desc
# icon: astahpro.png
# repo: https://astah.net/products/astah-professional/
# needed: adoptium-jdk
# compat: debian, ubuntu, fedora, rhel
source "$SCRIPT_DIR/libs/helpers.lib"
_lang_
DEB_LINK="https://members.change-vision.com/download/files/astah_professional/latest/linux_deb"
RPM_LINK="https://members.change-vision.com/download/files/astah_professional/latest/linux_rpm"
sudo_rq
if is_debian;then
_deb="$(curl -s -o /dev/null -w "%{redirect_url}\n" "${DEB_LINK}")"
_deb_name=$(basename ${_deb})
if curl -fsSL "${_deb}" -o "/tmp/${_deb_name}"; then
sudo apt update || true
if pkg_fromfile "/tmp/${_deb_name}"; then
zeninf "Astah Pro installed successfully!"
else
fatal "Installation failed (apt)."
fi
else
fatal "Failed to download: ${_deb_name}"
fi
elif is_fedora || is_rhel; then
_rpm="$(curl -s -o /dev/null -w "%{redirect_url}\n" "${RPM_LINK}")"
_rpm_name=$(basename ${_rpm})
if curl -fsSL "${_rpm}" -o "/tmp/${_rpm_name}"; then
if command -v dnf >/dev/null 2>&1; then
if pkg_fromfile "/tmp/${_rpm_name}"; then
zeninf "Astah Pro installed successfully!"
else
fatal "Installation failed (dnf)."
fi
fi
else
fatal "Failed to download: ${_rpm_name}"
fi
else
fatal "Unsupported distribution"
fi