Skip to content

Commit

Permalink
#113 fix inkscape install for other linux distros (non ubuntu)
Browse files Browse the repository at this point in the history
  • Loading branch information
CAMOBAP committed Aug 28, 2023
1 parent 3d267d2 commit ec4812e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions inkscape-setup-action/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,28 @@ runs:
win_prefix = "C:\\Program Files\\Inkscape\\bin"
platform_name = "Ubuntu" if 'ubuntu' in platform.version().lower() else platform.system()
cmds = {
"Darwin": [ "HOMEBREW_CASK_OPTS='--no-quarantine' brew install --cask inkscape", "inkscape --version" ],
"Windows": [
"choco install --no-progress -y inkscape",
"echo {}>> {}".format(win_prefix, os.environ["GITHUB_PATH"]),
"\"{}\\inkscape\" --version".format(win_prefix)
],
"Linux": [
"Ubuntu": [
"sudo add-apt-repository ppa:inkscape.dev/stable",
"sudo apt update",
"sudo apt install inkscape",
"which inkscape",
"inkscape --version"
],
"Linux": [
"wget https://inkscape.org/gallery/item/42330/Inkscape-0e150ed-x86_64.AppImage -O /usr/local/bin/inkscape",
"sudo chmod +x /usr/local/bin/inkscape",
"inkscape --version"
]
}.get(platform.system(), [ "echo \"Unsupported platform: {}\"".format(platform.system()), "exit 1" ])
}.get(platform_name, [ "echo \"Unsupported platform: {}\"".format(platform_name), "exit 1" ])
for cmd in cmds:
if os.system(cmd) != 0:
Expand Down

0 comments on commit ec4812e

Please sign in to comment.