Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.20 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. #Create all the functions to make calling things easier later on.
  4.  
  5. main_menu() #beginning of main menu function
  6. {
  7. clear
  8.  
  9. while [ 1=1 ]
  10.  
  11. do
  12.  
  13. echo "[1] - Sync local data with mirror     [2] - Sync & Update System"
  14. echo "[3] - Graphics                [4] - Misc Applications"
  15. echo
  16. echo -n "Enter choice here: "
  17. read choice
  18.  
  19.  
  20. if [ "$choice" = "1" ]
  21. then clear
  22. echo "Syncing local package information with the mirror..."
  23. pacman -Sy
  24.  
  25. read -n 1 -p "Press any key to continue.."
  26. clear
  27.  
  28.  
  29. elif [ "$choice" = "2" ]
  30. then clear
  31. echo "Syncing package information with mirror and updating packages.."
  32. pacman -Syu
  33.  
  34. read -n 1 -p "Press any key to continue..."
  35. clear
  36.  
  37.  
  38. elif [ "$choice" = "3" ]
  39. then clear
  40. graphics
  41.  
  42.  
  43. elif [ "$choice" = "4" ]
  44. then clear
  45. misc_apps
  46.  
  47. else
  48.     echo "You done typed the wrong keys buddy"
  49.  
  50. fi
  51. done
  52.  
  53. }
  54.  
  55. #End of Main Menu Function
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65. KDE() #Beginning of KDE function
  66. {
  67.  
  68. while [ 1=1 ]
  69.  
  70. do
  71.  
  72.  
  73. echo "[I]nstall the group KDE"
  74. echo "[B]ack to Desktop Environments Menu"
  75. echo "[R]eturn to main menu"
  76. echo
  77. echo -n "Enter choice here"
  78. read choice
  79.  
  80. if [ "$choice" =  "i" ]
  81. then
  82. clear
  83. echo "Syncing repositories and downloading KDE4..."
  84.  
  85. pacman -Sy kde
  86.  
  87.  
  88. read -n 1 -p "Press any Key to continue..."
  89. clear
  90.  
  91.  
  92. elif [ "$choice" = "b" ]
  93. then sleep 1
  94. clear
  95. echo "returning to Desktop Environments.."
  96. clear
  97. desktop_environments
  98.  
  99. elif [ "$choice" = "r" ]
  100. then clear
  101.  
  102. main_menu
  103.  
  104.  
  105.  
  106.  
  107.  
  108. else
  109.     echo "You done typed the wrong key buddy!"
  110.  
  111. fi
  112.  
  113. done
  114. }
  115.  
  116. #End of KDE function
  117.  
  118.  
  119. GNOME()
  120. {
  121.  
  122. clear
  123.  
  124. while [ 1=1 ]
  125.  
  126. do
  127.  
  128. echo "[I]nstall the group KDE"
  129. echo "[B]ack to Desktop Environments Menu"
  130. echo "[R]eturn to main menu"
  131. echo
  132. echo -n "Enter choice here"
  133. read choice
  134.  
  135.  
  136. if [ "$choice" = "i" ]
  137. then clear
  138.  
  139. echo "Syncing repositories and downloading GNOME..."
  140. pacman -Sy gnome gnome-extra
  141.  
  142. read -n 1 -p "Press any key to continue..."
  143. clear
  144.  
  145. elif [ "$choice" = "b" ]
  146. then clear
  147. sleep 1
  148. echo "Returning to Desktop Environments..."
  149.  
  150. desktop_environments
  151.  
  152. elif [ "$choice" = "r" ]
  153. then clear
  154. sleep 1
  155. echo "Returning to Main Menu.."
  156.  
  157.  
  158. main_menu
  159.  
  160.  
  161. else
  162.     echo "You done type the wrong key buddy!"
  163.  
  164. fi
  165.  
  166. done
  167. }
  168.  
  169. #TODO
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement