fork(167) download
  1. #!/usr/bin/env bash
  2.  
  3. #Exit if any commands return a non-zero status
  4. set -e
  5.  
  6. # posix compliant sanity check
  7. if [ -z $BASH ] || [ $BASH = "/bin/sh" ]; then
  8. echo "Please use the bash interpreter to run this script"
  9. exit 1
  10. fi
  11.  
  12. trap "ouch" ERR
  13.  
  14. ouch() {
  15. printf '\E[31m'
  16.  
  17. cat<<EOL
  18.  
  19. !! ERROR !!
  20.  
  21. The last command did not complete successfully,
  22. For more details or trying running the
  23. script again with the -v flag.
  24.  
  25. Output of the script is recorded in $LOG
  26.  
  27. EOL
  28. printf '\E[0m'
  29.  
  30. }
  31.  
  32. #Setting error color to red before reset
  33. error() {
  34. printf '\E[31m'; echo "$@"; printf '\E[0m'
  35. }
  36.  
  37. #Setting warning color to magenta before reset
  38. warning() {
  39. printf '\E[35m'; echo "$@"; printf '\E[0m'
  40. }
  41.  
  42. #Setting output color to cyan before reset
  43. output() {
  44. printf '\E[36m'; echo "$@"; printf '\E[0m'
  45. }
  46.  
  47. usage() {
  48. cat<<EO
  49.  
  50. Usage: $PROG [-c] [-v] [-h]
  51. int fastest(int width, int height, int[] washTimes)
  52. -c compile scipy and numpy
  53. -s give access to global site-packages for virtualenv
  54. -v set -x + spew
  55. -h this
  56.  
  57. EO
  58. info
  59. }
  60.  
  61. info() {
  62. cat<<EO
  63. edX base dir : $BASE
  64. Python virtualenv dir : $PYTHON_DIR
  65. Ruby RVM dir : $RUBY_DIR
  66. Ruby ver : $RUBY_VER
  67.  
  68. EO
  69. }
  70.  
  71. change_git_push_defaults() {
  72.  
  73. #Set git push defaults to upstream rather than master
  74. output "Changing git defaults"
  75. git config --global push.default upstream
  76.  
  77. }
  78.  
  79. clone_repos() {
  80.  
  81. change_git_push_defaults
  82.  
  83. cd "$BASE"
  84.  
  85. if [[ -d "$BASE/edx-platform/.git" ]]; then
  86. output "Pulling edx platform"
  87. cd "$BASE/edx-platform"
  88. git pull
  89. else
  90. output "Cloning edx platform"
  91. if [[ -d "$BASE/edx-platform" ]]; then
  92. output "Creating backup for existing edx platform"
  93. mv "$BASE/edx-platform" "${BASE}/edx-platform.bak.$$"
  94. fi
  95. git clone https://g...content-available-to-author-only...b.com/edx/edx-platform.git
  96. fi
  97. }
  98.  
  99.  
  100. ### START
  101.  
  102. PROG=${0##*/}
  103.  
  104. # Adjust this to wherever you'd like to place the codebase
  105. BASE="${PROJECT_HOME:-$HOME}/edx_all"
  106.  
  107. # Use a sensible default (~/.virtualenvs) for your Python virtualenvs
  108. # unless you've already got one set up with virtualenvwrapper.
  109. PYTHON_DIR=${WORKON_HOME:-"$HOME/.virtualenvs"}
  110.  
  111. # RVM defaults its install to ~/.rvm, but use the overridden rvm_path
  112. # if that's what's preferred.
  113. RUBY_DIR=${rvm_path:-"$HOME/.rvm"}
  114.  
  115. LOG="/var/tmp/install-$(date +%Y%m%d-%H%M%S).log"
  116.  
  117. # Make sure the user's not about to do anything dumb
  118. if [[ $EUID -eq 0 ]]; then
  119. error "This script should not be run using sudo or as the root user"
  120. usage
  121. exit 1
  122. fi
  123.  
  124. # If in an existing virtualenv, bail
  125. if [[ "x$VIRTUAL_ENV" != "x" ]]; then
  126. envname=`basename $VIRTUAL_ENV`
  127. error "Looks like you're already in the \"$envname\" virtual env."
  128. error "Run \`deactivate\` and then re-run this script."
  129. usage
  130. exit 1
  131. fi
  132.  
  133. # Read arguments
  134. ARGS=$(getopt "cvhs" "$*")
  135. if [[ $? != 0 ]]; then
  136. usage
  137. exit 1
  138. fi
  139. eval set -- "$ARGS"
  140. while true; do
  141. case $1 in
  142. -c)
  143. compile=true
  144. shift
  145. ;;
  146. -s)
  147. systempkgs=true
  148. shift
  149. ;;
  150. -v)
  151. set -x
  152. verbose=true
  153. shift
  154. ;;
  155. -h)
  156. usage
  157. exit 0
  158. ;;
  159. --)
  160. shift
  161. break
  162. ;;
  163. esac
  164. done
  165.  
  166. cat<<EO
  167.  
  168. This script will setup a local edX environment, this
  169. includes
  170.  
  171. * Django
  172. * A local copy of Python and library dependencies
  173. * A local copy of Ruby and library dependencies
  174.  
  175. It will also attempt to install operating system dependencies
  176. with apt(debian) or brew(OSx).
  177.  
  178. To compile scipy and numpy from source use the -c option
  179.  
  180. !!! Do not run this script from an existing virtualenv !!!
  181.  
  182. If you are in a ruby/python virtualenv please start a new
  183. shell.
  184.  
  185. EO
  186. info
  187. output "Press return to begin or control-C to abort"
  188. read dummy
  189.  
  190.  
  191. # Log all stdout and stderr
  192.  
  193. exec > >(tee $LOG)
  194. exec 2>&1
  195.  
  196.  
  197. # Install basic system requirements
  198.  
  199. mkdir -p $BASE
  200. case `uname -s` in
  201. [Ll]inux)
  202. command -v lsb_release &>/dev/null || {
  203. error "Please install lsb-release."
  204. exit 1
  205. }
  206.  
  207. distro=`lsb_release -cs`
  208. case $distro in
  209. wheezy|jessie|maya|olivia|nadia|precise|quantal)
  210. warning "Debian support is not fully debugged. Assuming you have standard
  211. development packages already working like scipy rvm, the
  212. installation should go fine, but this is still a work in progress.
  213.  
  214. Please report issues you have and let us know if you are able to figure
  215. out any workarounds or solutions
  216.  
  217. Press return to continue or control-C to abort"
  218.  
  219. read dummy
  220. sudo apt-get install git ;;
  221. squeeze|lisa|katya|oneiric|natty|raring)
  222. warning "It seems like you're using $distro which has been deprecated.
  223. While we don't technically support this release, the install
  224. script will probably still work.
  225.  
  226. Raring requires an install of rvm to work correctly as the raring
  227. package manager does not yet include a package for rvm
  228.  
  229. Press return to continue or control-C to abort"
  230. read dummy
  231. sudo apt-get install git
  232. ;;
  233.  
  234. *)
  235. error "Unsupported distribution - $distro"
  236. exit 1
  237. ;;
  238. esac
  239. ;;
  240.  
  241. Darwin)
  242. if [[ ! -w /usr/local ]]; then
  243. cat<<EO
  244.  
  245. You need to be able to write to /usr/local for
  246. the installation of brew and brew packages.
  247.  
  248. Either make sure the group you are in (most likely 'staff')
  249. can write to that directory or simply execute the following
  250. and re-run the script:
  251.  
  252. $ sudo chown -R $USER /usr/local
  253. EO
  254.  
  255. exit 1
  256.  
  257. fi
  258.  
  259. command -v brew &>/dev/null || {
  260. output "Installing brew"
  261. /usr/bin/ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
  262. }
  263. command -v git &>/dev/null || {
  264. output "Installing git"
  265. brew install git
  266. }
  267.  
  268. ;;
  269. *)
  270. error "Unsupported platform. Try switching to either Mac or a Debian-based linux distribution (Ubuntu, Debian, or Mint)"
  271. exit 1
  272. ;;
  273. esac
  274.  
  275.  
  276. # Clone MITx repositories
  277.  
  278. clone_repos
  279.  
  280. # Sanity check to make sure the repo layout hasn't changed
  281. if [[ -d $BASE/edx-platform/scripts ]]; then
  282. output "Installing system-level dependencies"
  283. bash $BASE/edx-platform/scripts/install-system-req.sh
  284. else
  285. error "It appears that our directory structure has changed and somebody failed to update this script.
  286. raise an issue on Github and someone should fix it."
  287. exit 1
  288. fi
  289.  
  290. # Install system-level dependencies
  291.  
  292. output "Installing RVM, Ruby, and required gems"
  293.  
  294. # If we're not installing RVM in the default location, then we'll do some
  295. # funky stuff to make sure that we load in the RVM stuff properly on login.
  296. if [ "$HOME/.rvm" != $RUBY_DIR ]; then
  297. if ! grep -q "export rvm_path=$RUBY_DIR" ~/.rvmrc; then
  298. if [[ -f $HOME/.rvmrc ]]; then
  299. output "Copying existing .rvmrc to .rvmrc.bak"
  300. cp $HOME/.rvmrc $HOME/.rvmrc.bak
  301. fi
  302. output "Creating $HOME/.rvmrc so rvm uses $RUBY_DIR"
  303. echo "export rvm_path=$RUBY_DIR" > $HOME/.rvmrc
  304. fi
  305. fi
  306.  
  307. # rvm has issues in debian family, this is taken from stack overflow
  308. case `uname -s` in
  309. Darwin)
  310. curl -sL get.rvm.io | bash -s -- --version 1.15.7
  311. ;;
  312.  
  313. squeeze|wheezy|jessie|maya|lisa|olivia|nadia|natty|oneiric|precise|quantal|raring)
  314. warning "Setting up rvm on linux. This is a known pain point. If the script fails here
  315. refer to the following stack overflow question:
  316. http://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395"
  317. sudo apt-get --purge remove ruby-rvm
  318. sudo rm -rf /usr/share/ruby-rvm /etc/rvmrc /etc/profile.d/rvm.sh
  319. curl -sL https://g...content-available-to-author-only...m.io | bash -s stable --ruby --autolibs=enable --autodotfiles
  320. ;;
  321. esac
  322.  
  323.  
  324. # Ensure we have RVM available as a shell function so that it can mess
  325. # with the environment and set everything up properly. The RVM install
  326. # process adds this line to login scripts, so this shouldn't be necessary
  327. # for the user to do each time.
  328. if [[ `type -t rvm` != "function" ]]; then
  329. source $RUBY_DIR/scripts/rvm
  330. fi
  331.  
  332. # Ruby doesn't like to build with clang, which is the default on OS X, so
  333. # use gcc instead. This may not work, since if your gcc was installed with
  334. # XCode 4.2 or greater, you have an LLVM-based gcc, which also doesn't
  335. # always play nicely with Ruby, though it seems to be better than clang.
  336. # You may have to install apple-gcc42 using Homebrew if this doesn't work.
  337. # See `rvm requirements` for more information.
  338. case `uname -s` in
  339. Darwin)
  340. export CC=gcc
  341. ;;
  342. esac
  343.  
  344. # Let the repo override the version of Ruby to install
  345. if [[ -r $BASE/edx-platform/.ruby-version ]]; then
  346. RUBY_VER=`cat $BASE/edx-platform/.ruby-version`
  347. fi
  348.  
  349. # Current stable version of RVM (1.19.0) requires the following to build Ruby:
  350. #
  351. # autoconf automake libtool pkg-config libyaml libxml2 libxslt libksba openssl
  352. #
  353. # If we decide to upgrade from the current version (1.15.7), can run
  354. #
  355. # LESS="-E" rvm install $RUBY_VER --autolibs=3 --with-readline
  356. #
  357. # to have RVM look for a package manager like Homebrew and install any missing
  358. # libs automatically. RVM's --autolibs flag defaults to 2, which will fail if
  359. # any required libs are missing.
  360. LESS="-E" rvm install $RUBY_VER --with-readline
  361.  
  362. # Create the "edx" gemset
  363. rvm use "$RUBY_VER@edx-platform" --create
  364. rvm rubygems latest
  365.  
  366. output "Installing gem bundler"
  367. gem install bundler
  368.  
  369. output "Installing ruby packages"
  370. bundle install --gemfile $BASE/edx-platform/Gemfile
  371.  
  372.  
  373. # Install Python virtualenv
  374.  
  375. output "Installing python virtualenv"
  376.  
  377. case `uname -s` in
  378. Darwin)
  379. # Add brew's path
  380. PATH=/usr/local/share/python:/usr/local/bin:$PATH
  381. ;;
  382. esac
  383.  
  384. # virtualenvwrapper uses the $WORKON_HOME env var to determine where to place
  385. # virtualenv directories. Make sure it matches the selected $PYTHON_DIR.
  386. export WORKON_HOME=$PYTHON_DIR
  387.  
  388. # Load in the mkvirtualenv function if needed
  389. if [[ `type -t mkvirtualenv` != "function" ]]; then
  390. case `uname -s` in
  391. Darwin)
  392. source `which virtualenvwrapper.sh`
  393. ;;
  394.  
  395. squeeze|wheezy|jessie|maya|lisa|olivia|nadia|natty|oneiric|precise|quantal|raring)
  396. if [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
  397. source /etc/bash_completion.d/virtualenvwrapper
  398. else
  399. error "Could not find virtualenvwrapper"
  400. exit 1
  401. fi
  402. ;;
  403. esac
  404. fi
  405.  
  406. # Create edX virtualenv and link it to repo
  407. # virtualenvwrapper automatically sources the activation script
  408. if [[ $systempkgs ]]; then
  409. mkvirtualenv -a "$HOME/.virtualenvs" --system-site-packages edx-platform || {
  410. error "mkvirtualenv exited with a non-zero error"
  411. return 1
  412. }
  413. else
  414. # default behavior for virtualenv>1.7 is
  415. # --no-site-packages
  416. pwd
  417. export WORKON_HOME=$HOME/.virtualenvs
  418. source /usr/local/bin/virtualenvwrapper.sh
  419. mkvirtualenv -a "$HOME/.virtualenvs" edx-platform || {
  420. error "mkvirtualenv exited with a non-zero error"
  421. return 1
  422. }
  423. fi
  424.  
  425.  
  426. # compile numpy and scipy if requested
  427.  
  428. NUMPY_VER="1.6.2"
  429. SCIPY_VER="0.10.1"
  430.  
  431. if [[ -n $compile ]]; then
  432. output "Downloading numpy and scipy"
  433. curl -sL -o numpy.tar.gz http://d...content-available-to-author-only...e.net/project/numpy/NumPy/${NUMPY_VER}/numpy-${NUMPY_VER}.tar.gz
  434. curl -sL -o scipy.tar.gz http://d...content-available-to-author-only...e.net/project/scipy/scipy/${SCIPY_VER}/scipy-${SCIPY_VER}.tar.gz
  435. tar xf numpy.tar.gz
  436. tar xf scipy.tar.gz
  437. rm -f numpy.tar.gz scipy.tar.gz
  438. output "Compiling numpy"
  439. cd "$BASE/numpy-${NUMPY_VER}"
  440. python setup.py install
  441. output "Compiling scipy"
  442. cd "$BASE/scipy-${SCIPY_VER}"
  443. python setup.py install
  444. cd "$BASE"
  445. rm -rf numpy-${NUMPY_VER} scipy-${SCIPY_VER}
  446. fi
  447.  
  448. # building correct version of distribute from source
  449. DISTRIBUTE_VER="0.6.28"
  450. output "Building Distribute"
  451. SITE_PACKAGES="$HOME/.virtualenvs/edx-platform/lib/python2.7/site-packages"
  452. cd "$SITE_PACKAGES"
  453. curl -O http://p...content-available-to-author-only...n.org/packages/source/d/distribute/distribute-${DISTRIBUTE_VER}.tar.gz
  454. tar -xzvf distribute-${DISTRIBUTE_VER}.tar.gz
  455. cd distribute-${DISTRIBUTE_VER}
  456. python setup.py install
  457. cd ..
  458. rm distribute-${DISTRIBUTE_VER}.tar.gz
  459.  
  460. DISTRIBUTE_VERSION=`pip freeze | grep distribute`
  461.  
  462. if [[ "$DISTRIBUTE_VERSION" == "distribute==0.6.28" ]]; then
  463. output "Distribute successfully installed"
  464. else
  465. error "Distribute failed to build correctly. This script requires a working version of Distribute 0.6.28 in your virtualenv's python installation"
  466. exit 1
  467. fi
  468.  
  469. case `uname -s` in
  470. Darwin)
  471. # on mac os x get the latest distribute and pip
  472. pip install -U pip
  473. # need latest pytz before compiling numpy and scipy
  474. pip install -U pytz
  475. pip install numpy
  476. # scipy needs cython
  477. pip install cython
  478. # fixes problem with scipy on 10.8
  479. pip install -e git+https://g...content-available-to-author-only...b.com/scipy/scipy#egg=scipy-dev
  480. ;;
  481. esac
  482.  
  483. output "Installing edX pre-requirements"
  484. pip install -r $BASE/edx-platform/requirements/edx/pre.txt
  485.  
  486. output "Installing edX requirements"
  487. # Install prereqs
  488. cd $BASE/edx-platform
  489. rvm use $RUBY_VER
  490. gem install launchy
  491. gem install colorize
  492. gem update
  493. rake install_prereqs
  494.  
  495. # Final dependecy
  496. output "Finishing Touches"
  497. cd $BASE
  498. pip install argcomplete
  499. cd $BASE/edx-platform
  500. bundle install
  501.  
  502. mkdir "$BASE/log" || true
  503. mkdir "$BASE/db" || true
  504. mkdir "$BASE/data" || true
  505.  
  506. rake django-admin[syncdb]
  507. rake django-admin[migrate]
  508. rake cms:update_templates
  509. # Configure Git
  510.  
  511. output "Fixing your git default settings"
  512. git config --global push.default current
  513.  
  514.  
  515. ### DONE
  516.  
  517. cat<<END
  518. Success!!
  519.  
  520. To start using Django you will need to activate the local Python
  521. and Ruby environments. Ensure the following lines are added to your
  522. login script, and source your login script if needed:
  523.  
  524. source `which virtualenvwrapper.sh`
  525. source $RUBY_DIR/scripts/rvm
  526.  
  527. Then, every time you're ready to work on the project, just run
  528.  
  529. $ workon mitx
  530.  
  531. To initialize Django
  532.  
  533. $ rake django-admin[syncdb]
  534. $ rake django-admin[migrate]
  535.  
  536. To start the Django on port 8000
  537.  
  538. $ rake lms
  539.  
  540. Or to start Django on a different <port#>
  541.  
  542. $ rake django-admin[runserver,lms,dev,<port#>]
  543.  
  544. If the Django development server starts properly you
  545. should see:
  546.  
  547. Development server is running at http://127.0.0.1:<port#>/
  548. Quit the server with CONTROL-C.
  549.  
  550. Connect your browser to http://127.0.0.1:<port#> to
  551. view the Django site.
  552.  
  553.  
  554. END
  555. exit 0
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:2: error: invalid preprocessing directive #!
prog.cpp:3:2: error: invalid preprocessing directive #Exit
prog.cpp:6:3: error: invalid preprocessing directive #posix
prog.cpp:15:12: warning: character constant too long for its type [enabled by default]
prog.cpp:28:12: warning: multi-character character constant [-Wmultichar]
prog.cpp:32:2: error: invalid preprocessing directive #Setting
prog.cpp:34:14: warning: character constant too long for its type [enabled by default]
prog.cpp:34:42: warning: multi-character character constant [-Wmultichar]
prog.cpp:37:2: error: invalid preprocessing directive #Setting
prog.cpp:39:14: warning: character constant too long for its type [enabled by default]
prog.cpp:39:42: warning: multi-character character constant [-Wmultichar]
prog.cpp:42:2: error: invalid preprocessing directive #Setting
prog.cpp:44:14: warning: character constant too long for its type [enabled by default]
prog.cpp:44:42: warning: multi-character character constant [-Wmultichar]
prog.cpp:73:6: error: invalid preprocessing directive #Set
prog.cpp:100:1: error: stray ‘##’ in program
prog.cpp:100:1: error: stray ‘#’ in program
prog.cpp:102:1: error: stray ‘##’ in program
prog.cpp:104:3: error: invalid preprocessing directive #Adjust
prog.cpp:104:30: warning: missing terminating ' character [enabled by default]
prog.cpp:107:3: error: invalid preprocessing directive #Use
prog.cpp:108:3: error: invalid preprocessing directive #unless
prog.cpp:108:13: warning: missing terminating ' character [enabled by default]
prog.cpp:111:3: error: invalid preprocessing directive #RVM
prog.cpp:112:10: error: missing binary operator before token "'s what'"
prog.cpp:117:21: warning: missing terminating ' character [enabled by default]
prog.cpp:210:25: warning: missing terminating " character [enabled by default]
prog.cpp:217:47: warning: missing terminating " character [enabled by default]
prog.cpp:222:25: warning: missing terminating " character [enabled by default]
prog.cpp:223:13: warning: missing terminating ' character [enabled by default]
prog.cpp:229:47: warning: missing terminating " character [enabled by default]
prog.cpp:280:49: warning: missing terminating ' character [enabled by default]
prog.cpp:285:7: warning: missing terminating " character [enabled by default]
prog.cpp:286:52: warning: missing terminating " character [enabled by default]
prog.cpp:314:17: warning: missing terminating " character [enabled by default]
prog.cpp:326:59: warning: missing terminating ' character [enabled by default]
prog.cpp:332:13: warning: missing terminating ' character [enabled by default]
prog.cpp:334:69: warning: missing terminating ' character [enabled by default]
prog.cpp:336:67: warning: missing terminating ' character [enabled by default]
prog.cpp:358:26: warning: missing terminating ' character [enabled by default]
prog.cpp:379:19: warning: missing terminating ' character [enabled by default]
prog.cpp:527:21: warning: missing terminating ' character [enabled by default]
prog.cpp:112:0: error: unterminated #if
prog.cpp:4:1: error: ‘set’ does not name a type
prog.cpp:7:43: error: ‘then’ does not name a type
prog.cpp:33:7: error: ISO C++ forbids declaration of ‘error’ with no type [-fpermissive]
prog.cpp: In function ‘int error()’:
prog.cpp:34:7: error: ‘printf’ was not declared in this scope
prog.cpp:34:14: error: expected ‘;’ before '\x5b33316d'
prog.cpp:34:24: error: ‘echo’ was not declared in this scope
prog.cpp:34:29: error: expected ‘;’ before string constant
prog.cpp:34:42: error: expected ‘;’ before '\x1b5b306d'
prog.cpp:35:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:38:9: error: ISO C++ forbids declaration of ‘warning’ with no type [-fpermissive]
prog.cpp: In function ‘int warning()’:
prog.cpp:39:7: error: ‘printf’ was not declared in this scope
prog.cpp:39:14: error: expected ‘;’ before '\x5b33356d'
prog.cpp:39:24: error: ‘echo’ was not declared in this scope
prog.cpp:39:29: error: expected ‘;’ before string constant
prog.cpp:39:42: error: expected ‘;’ before '\x1b5b306d'
prog.cpp:40:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:43:8: error: ISO C++ forbids declaration of ‘output’ with no type [-fpermissive]
prog.cpp: In function ‘int output()’:
prog.cpp:44:7: error: ‘printf’ was not declared in this scope
prog.cpp:44:14: error: expected ‘;’ before '\x5b33366d'
prog.cpp:44:24: error: ‘echo’ was not declared in this scope
prog.cpp:44:29: error: expected ‘;’ before string constant
prog.cpp:44:42: error: expected ‘;’ before '\x1b5b306d'
prog.cpp:45:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:47:7: error: ISO C++ forbids declaration of ‘usage’ with no type [-fpermissive]
prog.cpp: In function ‘int usage()’:
prog.cpp:48:5: error: ‘cat’ was not declared in this scope
prog.cpp:48:10: error: ‘EO’ was not declared in this scope
prog.cpp:50:1: error: expected ‘;’ before ‘Usage’
prog.cpp:59:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:61:6: error: ISO C++ forbids declaration of ‘info’ with no type [-fpermissive]
prog.cpp: In function ‘int info()’:
prog.cpp:62:5: error: ‘cat’ was not declared in this scope
prog.cpp:62:10: error: ‘EO’ was not declared in this scope
prog.cpp:63:1: error: expected ‘;’ before ‘edX’
prog.cpp:69:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:71:26: error: ISO C++ forbids declaration of ‘change_git_push_defaults’ with no type [-fpermissive]
prog.cpp: In function ‘int change_git_push_defaults()’:
prog.cpp:74:12: error: expected ‘;’ before string constant
prog.cpp:75:38: warning: statement is a reference, not call, to function ‘output’ [-Waddress]
prog.cpp:77:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:79:13: error: ISO C++ forbids declaration of ‘clone_repos’ with no type [-fpermissive]
prog.cpp: In function ‘int clone_repos()’:
prog.cpp:83:5: error: expected ‘;’ before ‘cd’
prog.cpp:85:42: warning: statement is a reference, not call, to function ‘change_git_push_defaults’ [-Waddress]
prog.cpp:85:44: error: ‘then’ was not declared in this scope
prog.cpp:86:1: error: expected ‘;’ before ‘output’
prog.cpp:92:1: error: expected ‘;’ before ‘output’
prog.cpp:97:1: warning: no return statement in function returning non-void [-Wreturn-type]
prog.cpp: At global scope:
prog.cpp:100:5: error: ‘START’ does not name a type
prog.cpp:105:1: error: ‘BASE’ does not name a type
stdout
Standard output is empty