MeMyselfandLinux

Hari yang fitrah

Aug 18th, 2012
647
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.10 KB | None | 0 0
  1. #!/bin/bash
  2. echo -e "\e[1mHari yang Fitri\e[m";
  3. # Hati check
  4.  
  5. if [ -f /hati/ikhlas ]; then
  6.   VERSION=`cat /hati/ikhlas`
  7.   if [ ${VERSION:0:1} -lt 5 ]; then
  8.     die "Peringatan,Ikhlas $VERSION sudah tidak didukung silahkan upgrade versi anda"
  9.   fi
  10. else
  11.   die "BAHAYA!Ikhlas tidak terdeteksi,silahkan hapus /hati/dengki /hati/iri dan /hati/dendam lalu jalankan /akhlak/memaafkan.sh"
  12. fi
  13.  
  14. [ $(id -g) != "0" ] && die "Harus dijalankan dengan kemauan yang tulus"
  15.  
  16. choice=4
  17.  echo "1. Bersihkan Hati"
  18.  echo "2. Mari Berbagi"
  19.  echo "3. Bersama Menuju Kemenangan"
  20.  echo -n "Silahkan masukan pilihan [1,2 or 3]? "
  21. while [ $choice -eq 4 ]; do
  22. read choice
  23. if [ $choice -eq 1 ] ; then
  24.         {
  25.   for dosa in hati 'amarah*' perasaan 'dendam*'
  26.   do
  27.     if apt_installed $dosa; then
  28.       apt_remove $dosa
  29.       ok $dosa' removed.\n'
  30.     fi
  31.   done
  32. }
  33.  
  34. else                  
  35.  
  36.         if [ $choice -eq 2 ] ; then
  37.                  {
  38.                    if ! apt_installed Zakat; then
  39.     apt_install zakat
  40.         cat > /pikiran/logrotate.d/zakat <<EOF
  41. /akhlak/sedekah/log
  42. {
  43.   rotate 4
  44.   weekly
  45.   missingok
  46.   notifempty
  47.   compress
  48.   sharedscripts
  49.   postrotate
  50.     /pikiran/kerja/zakat reload > /dev/null
  51.   endscript
  52. }
  53. EOF
  54.  
  55.     invoke-rc.d zakat start
  56.     ok 'izakat installed and setup.\n'
  57.   fi
  58.   done
  59.                  }
  60.         else
  61.          
  62.                 if [ $choice -eq 3 ] ; then
  63.                         {
  64.   if yesno 'Kita akan bersama sama menuju hari yang fitri dengan membersihkan diri kita\nAre you ok to proceed' 'Y'; then
  65.  
  66.     hati update
  67.     hati --safe-resolver --without-recommends -y install '?or(~prequired,~pimportant)' '~i !~prequired !~pimportant'_ ikhlas
  68.  
  69.     debug 'Marilah kita kembali kepada diri kita yang bersih selayaknya bayi yang baru lahir.\n'
  70.   fi
  71.   done
  72. }
  73.                 else
  74.                         echo "Harap memasukan pilihan 1-3 !"
  75.                         echo "1. Bersihkan Hati"
  76.                         echo "2. Mari Berbagi"
  77.                         echo "3. Bersama Menuju Kemenangan"
  78.                         echo -n "Harap memasukan pilihan [1,2 atau 3]? "
  79.                         choice=4
  80.                 fi  
  81.         fi
  82. fi
Advertisement
Add Comment
Please, Sign In to add comment