Advertisement
shadowkat1010

[ SHAD-OS STANDALONE ] Main file

Aug 5th, 2012
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 2.55 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. ver="0.4A"
  4. date
  5. echo "STARTING SHAD-OS $ver"
  6. echo "CURRENT DIR:"
  7. pwd
  8. echo "READY"
  9. sleep 5
  10. cd USER
  11. clear
  12.  
  13. echo " ** SHAD-OSv$ver **"
  14.  
  15. for (( ; ; ))
  16. do
  17.     read input
  18.  
  19.     if [ $input = HELP ]
  20.             then
  21.         echo "-[ShadOS Help]-----------------"
  22.         echo "Welcome to ShadOS"
  23.         echo "The only OS running in ubuntu's"
  24.         echo "terminal and using BASH!"
  25.         echo ""
  26.         echo "Type PROGRAMS to see avalible"
  27.         echo "programs."
  28.         echo ""
  29.         echo "Type EDIT to edit a program or"
  30.         echo "text file. Have fun! :)"
  31.         echo "------------------------------"
  32.             elif [ $input = PROGRAMS ]
  33.         then
  34.         echo "-[PROGRAMS]-----"
  35.         echo "HELP    DIR"
  36.         echo "RUN     EDIT"
  37.         echo "CLEAR   EXIT"
  38.         echo "CWD     DELETE"
  39.         echo "RENAME  PASTEBIN"
  40.         echo "MKDIR   MEDIA"
  41.         echo "ZIP     "
  42.         echo "----------------"
  43.         elif [ $input = DIR ]
  44.         then pwd
  45.         ls
  46.         elif [ $input = RUN ]
  47.         then echo "Input file to run:"
  48.         read runfile
  49.         chmod +x $runfile
  50.         sudo ./$runfile
  51.         chmod -x $runfile
  52.         elif [ $input = EDIT ]
  53.         then nano
  54.         elif [ $input = MEDIA ]
  55.         then echo "Media to play:"
  56.         read medianame
  57.         mplayer -vo caca -autosync 1000 $medianame
  58.         elif [ $input = CLEAR ]
  59.         then clear
  60.         echo " ** SHAD-OSv$ver **"
  61.         elif [ $input = READ ]
  62.         then echo "File to read:"
  63.         read readfile
  64.         clear
  65.         echo " ** SHAD-OSv$ver ** "
  66.         cat $readfile
  67.         elif [ $input = CWD ]
  68.         then read newdir
  69.         cd newdir
  70.         elif [ $input = RENAME ]
  71.         then echo "File to rename:"
  72.         read file1
  73.         echo "New name:"
  74.         read file2
  75.         mv $file1 $file2
  76.         elif [ $input = MOVE ]
  77.         then echo "File to move:"
  78.         read file1
  79.         echo "Move to:"
  80.         read file2
  81.         mv $file1 $file2
  82.         elif [ $input = DELETE ]
  83.         then echo "File to delete:"
  84.         read file1
  85.         rm $file1
  86.         elif [ $input = MKDIR ]
  87.         then echo "Name folder:"
  88.         read folder
  89.         mkdir $folder
  90.         elif [ $input = PASTEBIN ]
  91.         then echo "Get a file or upload a file? (I/O)"
  92.         read -N 1 option
  93.         if [ $option = I ]
  94.         then echo "PASTEBIN CODE:"
  95.         read code
  96.         echo "LOCATION"
  97.         read location
  98.         wget -0 $location http://paste.ubuntu.com/$code/plain
  99.         elif [ $option = O ]
  100.         then echo " "
  101.         echo "LOCATION:"
  102.         read location
  103.         pastebinit $location
  104.         fi
  105.         elif [ $input = ZIP ]
  106.         then echo "Compress or decompress? I/O"
  107.         read mode
  108.         if [ $mode = I ]
  109.         then echo "Archive:"
  110.         read archive
  111.         echo "File/Folder:"
  112.         read filename
  113.         zip $archive $filename
  114.         elif [ $mode = O ]
  115.         then echo "Archive:"
  116.         read archive
  117.         unzip $archive
  118.         fi
  119.         elif [ $input = EXIT ]
  120.         then break
  121.         else
  122.         echo "UNKNOWN COMMAND: $input"
  123.     fi
  124. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement