Skip to content

Commit

Permalink
Merge pull request #33 from Adyel/patch-install.sh
Browse files Browse the repository at this point in the history
added variable to easily edit binnary link
  • Loading branch information
Adyel authored May 10, 2018
2 parents 0108a51 + 446d880 commit 38a1fb2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/install.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/bin/bash

# set Download link

ubuntuLink="https://github.com/OpenBangla/OpenBangla-Keyboard/releases/download/1.4.0/OpenBangla-Keyboard_1.4.0-ubuntu18.04.deb"
archLink="https://github.com/OpenBangla/OpenBangla-Keyboard/releases/download/1.4.0/openbangla-keyboard-1.4.0-1-x86_64-archlinux.pkg.tar.xz"
fedoraLink="https://github.com/OpenBangla/OpenBangla-Keyboard/releases/download/1.4.0/OpenBangla-Keyboard_1.4.0-fedora27.rpm"

# detect OS
os=$(python -c "exec(\"import platform\\nprint(platform.linux_distribution()[0])\")" )
echo Downloading $os Binary
Expand All @@ -10,18 +16,18 @@ echo Downloading $os Binary
case $os in

("Ubuntu")
wget -q --show-progress https://github.com/OpenBangla/OpenBangla-Keyboard/releases/download/1.4.0/OpenBangla-Keyboard_1.4.0-ubuntu18.04.deb -O ./OpenBangla.deb
wget -q --show-progress $ubuntuLink -O ./OpenBangla.deb
sudo apt install ./OpenBangla.deb
sudo rm -f ./OpenBangla.deb
;;

("arch")
wget -q --show-progress https://github.com/OpenBangla/OpenBangla-Keyboard/releases/download/1.4.0/openbangla-keyboard-1.4.0-1-x86_64-archlinux.pkg.tar.xz -O /tmp/OpenBangla.pkg.tar.xz
wget -q --show-progress $archLink -O /tmp/OpenBangla.pkg.tar.xz
sudo pacman -U /tmp/OpenBangla.pkg.tar.xz
;;

("Fedora")
wget -q --show-progress https://github.com/OpenBangla/OpenBangla-Keyboard/releases/download/1.4.0/OpenBangla-Keyboard_1.4.0-fedora27.rpm -O /tmp/OpenBangla.rpm
wget -q --show-progress $fedoraLink -O /tmp/OpenBangla.rpm
sudo dnf install /tmp/OpenBangla.rpm
sudo rm -f /tmp/OpenBangla.rpm
;;
Expand Down

0 comments on commit 38a1fb2

Please sign in to comment.