fork download
  1. #!/bin/bash
  2.  
  3. ############################################################################
  4. #
  5. # Copyright (c) 2013 - dsixda (dislam@rocketmail.com)
  6. #
  7. # Android Kitchen is 100% free. This script file is intended for personal
  8. # and/or educational use only. It may not be duplicated for monetary
  9. # benefit or any other purpose without the permission of the developer.
  10. #
  11. ############################################################################
  12.  
  13. version=0.224
  14.  
  15.  
  16. if [ ! -e menu ]
  17. then
  18. echo
  19. echo "Ensure you run this file from the SAME folder as where it was"
  20. echo "installed, otherwise the kitchen will have problems running the"
  21. echo "scripts. After you 'cd' to the correct folder, start the kitchen"
  22. echo "with the ./menu command, NOT with any other command or method!"
  23. exit 0
  24. fi
  25.  
  26. dir_list = (original_update, scripts, tools)
  27. error_found=0
  28.  
  29. for check_dir in ${dir_list[@]}
  30. do
  31. if [ ! -e $check_dir ]
  32. then
  33. echo "Ошибка: Папка '$check_dir' не найдена"
  34. error_found=1
  35. fi
  36. done
  37.  
  38. if [ $error_found == 1 ]
  39. then
  40. echo
  41. echo "Убедитесь, что вы установили папки для кухни правильно."
  42. exit 0
  43. fi
  44.  
  45.  
  46. chmod 755 scripts/*
  47. scripts/check_install_dir
  48.  
  49. if [ "$?" == "1" ]
  50. then
  51.   exit 0
  52. fi
  53.  
  54. scripts/init_kitchen
  55. scripts/check_binaries
  56.  
  57. if [ "$?" == "1" ]
  58. then
  59.   exit 0
  60. fi
  61.  
  62.  
  63. while :
  64. do
  65.  
  66.   clear
  67.  
  68.   echo "============================================================"
  69.   echo " Android Kitchen $version - by dsixda (xda-developers.com)"
  70.   echo " Перевод от Rostislav89 V 1.0"
  71.   echo "============================================================"
  72.   echo
  73.   echo "> Главное меню"
  74.   echo
  75.   echo " 1 - Создать Рабочую папку из прошивки (ROM)"
  76.   echo " 2 - Добавить Root Права (Суперпользователь)"
  77.   echo " 3 - Добавить BusyBox"
  78.   echo " 4 - Отключить экран загрузки звуков"
  79.   echo " 5 - Zipalign все .apk файлы, короче сжать."
  80.   echo " 6 - Сменить вайп статус прошивки"
  81.   echo " 7 - Сменить название прошивки"
  82.   echo " 8 - Просмотреть информацию о рабочей папке"
  83.   echo
  84.   echo " 0 - Дополнительные параметры"
  85.   echo " 00 - Дополнительные опции (старые и редко используются)"
  86.   echo " 99 - Собрать ROM из рабочей папки"
  87.   echo
  88.   echo " u - Иинормация о Kitchen"
  89.   echo " x - Выход"
  90.   echo
  91.   echo
  92.   echo -n "Введите номер команды: "
  93.   read opt
  94.  
  95.   if [ "$opt" != "x" ] && [ "$opt" != "u" ] && [ "$opt" != "1" ]
  96.   then
  97.   scripts/check_multiple_working
  98.   fi
  99.  
  100.   if [ "$?" != "1" ]
  101.   then
  102.   case $opt in
  103.   1) clear; scripts/check_rom; continue;;
  104.   2) scripts/do_root; continue;;
  105.   3) scripts/add_busybox show_help;;
  106.   4) scripts/disable_sounds;;
  107.   5) scripts/do_zipalign;;
  108.   6) scripts/change_wipe;;
  109.   7) scripts/change_rom_name;;
  110.   8) scripts/show_rom_info;;
  111.   0) scripts/menu_advanced $version; continue;;
  112.   00) scripts/menu_legacy $version; continue;;
  113.   99) scripts/build_rom;;
  114.   u) scripts/about $version; continue;;
  115.   x) scripts/init_kitchen; clear; echo; echo "Goodbye."; echo; exit 1;;
  116.   *) echo "Invalid option"; continue;;
  117.   esac
  118.   fi
  119.  
  120.   scripts/press_enter
  121.  
  122. done
  123.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
1
2
10
42
11
compilation info
prog.cpp:1:2: error: invalid preprocessing directive #!
 #!/bin/bash
  ^
prog.cpp:3:1: error: stray ‘##’ in program
 ############################################################################
 ^
prog.cpp:3:3: error: stray ‘##’ in program
 ############################################################################
   ^
prog.cpp:3:5: error: stray ‘##’ in program
 ############################################################################
     ^
prog.cpp:3:7: error: stray ‘##’ in program
 ############################################################################
       ^
prog.cpp:3:9: error: stray ‘##’ in program
 ############################################################################
         ^
prog.cpp:3:11: error: stray ‘##’ in program
 ############################################################################
           ^
prog.cpp:3:13: error: stray ‘##’ in program
 ############################################################################
             ^
prog.cpp:3:15: error: stray ‘##’ in program
 ############################################################################
               ^
prog.cpp:3:17: error: stray ‘##’ in program
 ############################################################################
                 ^
prog.cpp:3:19: error: stray ‘##’ in program
 ############################################################################
                   ^
prog.cpp:3:21: error: stray ‘##’ in program
 ############################################################################
                     ^
prog.cpp:3:23: error: stray ‘##’ in program
 ############################################################################
                       ^
prog.cpp:3:25: error: stray ‘##’ in program
 ############################################################################
                         ^
prog.cpp:3:27: error: stray ‘##’ in program
 ############################################################################
                           ^
prog.cpp:3:29: error: stray ‘##’ in program
 ############################################################################
                             ^
prog.cpp:3:31: error: stray ‘##’ in program
 ############################################################################
                               ^
prog.cpp:3:33: error: stray ‘##’ in program
 ############################################################################
                                 ^
prog.cpp:3:35: error: stray ‘##’ in program
 ############################################################################
                                   ^
prog.cpp:3:37: error: stray ‘##’ in program
 ############################################################################
                                     ^
prog.cpp:3:39: error: stray ‘##’ in program
 ############################################################################
                                       ^
prog.cpp:3:41: error: stray ‘##’ in program
 ############################################################################
                                         ^
prog.cpp:3:43: error: stray ‘##’ in program
 ############################################################################
                                           ^
prog.cpp:3:45: error: stray ‘##’ in program
 ############################################################################
                                             ^
prog.cpp:3:47: error: stray ‘##’ in program
 ############################################################################
                                               ^
prog.cpp:3:49: error: stray ‘##’ in program
 ############################################################################
                                                 ^
prog.cpp:3:51: error: stray ‘##’ in program
 ############################################################################
                                                   ^
prog.cpp:3:53: error: stray ‘##’ in program
 ############################################################################
                                                     ^
prog.cpp:3:55: error: stray ‘##’ in program
 ############################################################################
                                                       ^
prog.cpp:3:57: error: stray ‘##’ in program
 ############################################################################
                                                         ^
prog.cpp:3:59: error: stray ‘##’ in program
 ############################################################################
                                                           ^
prog.cpp:3:61: error: stray ‘##’ in program
 ############################################################################
                                                             ^
prog.cpp:3:63: error: stray ‘##’ in program
 ############################################################################
                                                               ^
prog.cpp:3:65: error: stray ‘##’ in program
 ############################################################################
                                                                 ^
prog.cpp:3:67: error: stray ‘##’ in program
 ############################################################################
                                                                   ^
prog.cpp:3:69: error: stray ‘##’ in program
 ############################################################################
                                                                     ^
prog.cpp:3:71: error: stray ‘##’ in program
 ############################################################################
                                                                       ^
prog.cpp:3:73: error: stray ‘##’ in program
 ############################################################################
                                                                         ^
prog.cpp:3:75: error: stray ‘##’ in program
 ############################################################################
                                                                           ^
prog.cpp:5:3: error: invalid preprocessing directive #Copyright
 # Copyright (c) 2013 - dsixda (dislam@rocketmail.com)
   ^
prog.cpp:7:3: error: invalid preprocessing directive #Android
 # Android Kitchen is 100% free.  This script file is intended for personal
   ^
prog.cpp:8:3: error: invalid preprocessing directive #and
 # and/or educational use only.  It may not be duplicated for monetary
   ^
prog.cpp:9:3: error: invalid preprocessing directive #benefit
 # benefit or any other purpose without the permission of the developer.
   ^
prog.cpp:11:1: error: stray ‘##’ in program
 ############################################################################
 ^
prog.cpp:11:3: error: stray ‘##’ in program
 ############################################################################
   ^
prog.cpp:11:5: error: stray ‘##’ in program
 ############################################################################
     ^
prog.cpp:11:7: error: stray ‘##’ in program
 ############################################################################
       ^
prog.cpp:11:9: error: stray ‘##’ in program
 ############################################################################
         ^
prog.cpp:11:11: error: stray ‘##’ in program
 ############################################################################
           ^
prog.cpp:11:13: error: stray ‘##’ in program
 ############################################################################
             ^
prog.cpp:11:15: error: stray ‘##’ in program
 ############################################################################
               ^
prog.cpp:11:17: error: stray ‘##’ in program
 ############################################################################
                 ^
prog.cpp:11:19: error: stray ‘##’ in program
 ############################################################################
                   ^
prog.cpp:11:21: error: stray ‘##’ in program
 ############################################################################
                     ^
prog.cpp:11:23: error: stray ‘##’ in program
 ############################################################################
                       ^
prog.cpp:11:25: error: stray ‘##’ in program
 ############################################################################
                         ^
prog.cpp:11:27: error: stray ‘##’ in program
 ############################################################################
                           ^
prog.cpp:11:29: error: stray ‘##’ in program
 ############################################################################
                             ^
prog.cpp:11:31: error: stray ‘##’ in program
 ############################################################################
                               ^
prog.cpp:11:33: error: stray ‘##’ in program
 ############################################################################
                                 ^
prog.cpp:11:35: error: stray ‘##’ in program
 ############################################################################
                                   ^
prog.cpp:11:37: error: stray ‘##’ in program
 ############################################################################
                                     ^
prog.cpp:11:39: error: stray ‘##’ in program
 ############################################################################
                                       ^
prog.cpp:11:41: error: stray ‘##’ in program
 ############################################################################
                                         ^
prog.cpp:11:43: error: stray ‘##’ in program
 ############################################################################
                                           ^
prog.cpp:11:45: error: stray ‘##’ in program
 ############################################################################
                                             ^
prog.cpp:11:47: error: stray ‘##’ in program
 ############################################################################
                                               ^
prog.cpp:11:49: error: stray ‘##’ in program
 ############################################################################
                                                 ^
prog.cpp:11:51: error: stray ‘##’ in program
 ############################################################################
                                                   ^
prog.cpp:11:53: error: stray ‘##’ in program
 ############################################################################
                                                     ^
prog.cpp:11:55: error: stray ‘##’ in program
 ############################################################################
                                                       ^
prog.cpp:11:57: error: stray ‘##’ in program
 ############################################################################
                                                         ^
prog.cpp:11:59: error: stray ‘##’ in program
 ############################################################################
                                                           ^
prog.cpp:11:61: error: stray ‘##’ in program
 ############################################################################
                                                             ^
prog.cpp:11:63: error: stray ‘##’ in program
 ############################################################################
                                                               ^
prog.cpp:11:65: error: stray ‘##’ in program
 ############################################################################
                                                                 ^
prog.cpp:11:67: error: stray ‘##’ in program
 ############################################################################
                                                                   ^
prog.cpp:11:69: error: stray ‘##’ in program
 ############################################################################
                                                                     ^
prog.cpp:11:71: error: stray ‘##’ in program
 ############################################################################
                                                                       ^
prog.cpp:11:73: error: stray ‘##’ in program
 ############################################################################
                                                                         ^
prog.cpp:11:75: error: stray ‘##’ in program
 ############################################################################
                                                                           ^
prog.cpp:29:29: error: stray ‘@’ in program
 for check_dir in ${dir_list[@]}
                             ^
prog.cpp:46:18: error: unterminated comment
 chmod 755 scripts/*
                  ^
prog.cpp:13:1: error: ‘version’ does not name a type
 version=0.224
 ^
prog.cpp:30:1: error: expected unqualified-id before ‘do’
 do
 ^
stdout
Standard output is empty