SwarupSaha

Deepin Avro

Jun 25th, 2016
379
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.82 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. echo "This will install ibus-avro on your system."
  4.  
  5. function install_avro()
  6. {
  7.     if [[ `arch` == *"$x86_84"* ]]; then
  8. echo "Running in 64bit"
  9. {
  10. mkdir /tmp/insttools/ >/dev/null 2>&1
  11. echo "done 1/7"
  12. wget http://mirror.amberit.com.bd/debian/pool/main/i/im-config/im-config_0.29-1.4_all.deb -P /tmp/insttools/ >/dev/null 2>&1
  13. wget http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/amd64/ibus-avro-trusty_1.2_amd64.deb -P /tmp/insttools/ >/dev/null 2>&1
  14. echo "done 2/7"
  15. dpkg -i /tmp/insttools/im-config_0.29-1.4_all.deb >/dev/null 2>&1
  16. echo "done 3/7"
  17. dpkg -i /tmp/insttools/ibus-avro-trusty_1.2_amd64.deb >/dev/null 2>&1
  18. echo "done 4/7"
  19. apt install -f >/dev/null 2>&1
  20. echo "done 5/7"
  21. rm -rf /tmp/insttools/
  22. echo "done 6/7"
  23. loggeduser=`who -u | cut -d' ' -f1`
  24. {
  25. su "$loggeduser" <<'EOF'
  26. im-config -n ibus
  27. EOF
  28. }
  29. echo "done 7/7"
  30. }
  31. fi
  32.     if [[ `arch` == *"i686"* ]]; then
  33. echo "Running in 32 bit"
  34. {
  35. mkdir /tmp/insttools/ >/dev/null 2>&1
  36. echo "done 1/7"
  37. wget http://download.opensuse.org/repositories/home:/sarimkhan/xUbuntu_14.04/i386/ibus-avro-trusty_1.2_i386.deb -P /tmp/insttools/ >/dev/null 2>&1
  38. wget http://mirror.amberit.com.bd/debian/pool/main/i/im-config/im-config_0.29-1.4_all.deb -P /tmp/insttools/ >/dev/null 2>&1
  39. echo "done 2/7"
  40. dpkg -i /tmp/insttools/im-config_0.29-1.4_all.deb >/dev/null 2>&1
  41. echo "done 3/7"
  42. dpkg -i /tmp/insttools/ibus-avro-trusty_1.2_i386.deb >/dev/null 2>&1
  43. echo "done 4/7"
  44. apt install -f >/dev/null 2>&1
  45. echo "done 5/7"
  46. rm -rf /tmp/insttools/
  47. echo "done 6/7"
  48. loggeduser=`who -u | cut -d' ' -f1`
  49. {
  50. su "$loggeduser" <<'EOF'
  51. im-config -n ibus
  52. EOF
  53. }
  54. echo "done 7/7"
  55. }
  56. fi
  57. }
  58.     if [ `id -u` -ne 0 ]; then
  59.     echo "Plaese execute this script as root."
  60. fi
  61.     if [ `id -u` -eq 0 ]; then
  62. install_avro
  63. echo "You must log out and log back in to verify."
  64. fi
Add Comment
Please, Sign In to add comment