From a5d7037ca250099a0df9e4b9b85c9ee6b7e83487 Mon Sep 17 00:00:00 2001 From: Dan Armendariz Date: Tue, 10 Mar 2015 21:49:30 -0400 Subject: [PATCH] issue 6 fix, gdb's setState() properly sets state var --- local/install.sh | 242 ----------------------------------------------- package.json | 48 +++++----- 2 files changed, 24 insertions(+), 266 deletions(-) delete mode 100755 local/install.sh diff --git a/local/install.sh b/local/install.sh deleted file mode 100755 index 4075cb6c..00000000 --- a/local/install.sh +++ /dev/null @@ -1,242 +0,0 @@ -#!/bin/bash -e -set -e -has() { - type "$1" > /dev/null 2>&1 - return $? -} - -# Redirect stdout ( > ) into a named pipe ( >() ) running "tee" -exec > >(tee /tmp/installlog.txt) - -# Without this, only stdout would be captured - i.e. your -# log file would not contain any error messages. -exec 2>&1 - -NODE_VERSION=v0.10.28 -APPSUPPORT_USER=$HOME/.c9 -SCRIPT="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -RUNTIME=$SCRIPT/.. -INSTALL_DIR=/tmp/c9-`date '+%s'` -ORIGINAL_USER=`basename $HOME` -OSX_INSTALLER_PATH=$2 - -start() { - if [ $# -lt 1 ]; then - start base - return - fi - - # Try to figure out the os and arch for binary fetching - local uname="$(uname -a)" - local os= - local arch="$(uname -m)" - case "$uname" in - Linux\ *) os=linux ;; - Darwin\ *) os=darwin ;; - SunOS\ *) os=sunos ;; - FreeBSD\ *) os=freebsd ;; - esac - case "$uname" in - *x86_64*) arch=x64 ;; - *i*86*) arch=x86 ;; - *armv6l*) arch=arm-pi ;; - esac - - if [ $os != "linux" ] && [ $os != "darwin" ]; then - echo "Unsupported Platform: $os $arch" 1>&2 - exit 1 - fi - - if [ $arch != "x64" ] && [ $arch != "x86" ]; then - echo "Unsupported Architecture: $os $arch" 1>&2 - exit 1 - fi - - if [ $os == "darwin" ]; then - APPSUPPORT_USER="$HOME/Library/Application Support/Cloud9" - APPTARGET=$OSX_INSTALLER_PATH - APPSUPPORT="/Library/Application Support/Cloud9" - RUNTIME="${APPTARGET}/Contents/Resources/app.nw" - fi - - case $1 in - "help" ) - echo - echo "Cloud9 Installer" - echo - echo "Usage:" - echo " install help Show this message" - echo " install install [name [name ...]] Download and install a set of packages" - echo " install ls List available packages" - echo - ;; - - "ls" ) - echo "!node - Node.js" - echo "!tmux_install - TMUX" - echo "!nak - NAK" - echo "!vfsextend - VFS extend" - echo "!ptyjs - pty.js" - echo "!c9cli - C9 CLI" - echo "!sc - Sauce Connect" - echo "coffee - Coffee Script" - echo "less - Less" - echo "sass - Sass" - echo "typescript - TypeScript" - echo "stylus - Stylus" - # echo "go - Go" - # echo "heroku - Heroku" - # echo "rhc - RedHat OpenShift" - # echo "gae - Google AppEngine" - ;; - - "install" ) - shift - - # make sure dirs are around - mkdir -p "$APPSUPPORT/bin" - mkdir -p "$APPSUPPORT/node_modules" - cd "$APPSUPPORT" - - cp -a "$SCRIPT" "$INSTALL_DIR" - - # install packages - while [ $# -ne 0 ] - do - time eval ${1} $os $arch - shift - done - - # finalize - #pushd $APPSUPPORT/node_modules/.bin - #for FILE in $APPSUPPORT/node_modules/.bin/*; do - # if [ `uname` == Darwin ]; then - # sed -i "" -E s:'#!/usr/bin/env node':"#!$NODE":g $(readlink $FILE) - # else - # sed -i -E s:'#!/usr/bin/env node':"#!$NODE":g $(readlink $FILE) - # fi - #done - #popd - - VERSION=`cat $RUNTIME/version || echo 1` - echo 1 > "$APPSUPPORT/installed" - echo $VERSION > "$APPSUPPORT/version" - - # set chown/chmod of application dirs for update - echo "Testing existence of APPTARGET (${APPTARGET})" - if [ -d "$APPTARGET" ]; then - echo "Updating permissions of APPTARGET (${APPTARGET})" - chown -R root:admin "$APPTARGET" || chown -R root:staff "$APPTARGET" - chmod -R 775 "$APPTARGET" - fi - - echo "Testing existence of APPSUPPORT (${APPSUPPORT})" - if [ -d "$APPSUPPORT" ]; then - echo "Updating permissions of APPSUPPORT (${APPSUPPORT})" - chown -R root:admin "$APPSUPPORT" || chown -R root:staff "$APPSUPPORT" - chmod -R 775 "$APPSUPPORT" - fi - - echo "Testing existence of APPSUPPORT_USER (${APPSUPPORT_USER})" - if [ -n "$ORIGINAL_USER" ] && [ -d "$APPSUPPORT_USER" ]; then - echo "Updating permissions of APPSUPPORT_USER (${APPSUPPORT_USER})" - chown -R $ORIGINAL_USER "$APPSUPPORT_USER" - fi - - rm -Rf $INSTALL_DIR - - echo :Done. - ;; - - "base" ) - echo "Installing base packages. Use '`basename $0` help' for more options" - start install node tmux_install nak ptyjs sc vfsextend c9cli - ;; - - * ) - start base - ;; - esac -} - -# NodeJS - -node(){ - # clean up - rm -rf node - rm -rf node-$NODE_VERSION* - - echo :Installing Node $NODE_VERSION - - cd "$INSTALL_DIR" - tar xvfz node-$NODE_VERSION-$1-$2.tar.gz - rm -Rf "$APPSUPPORT/node" - mv node-$NODE_VERSION-$1-$2 "$APPSUPPORT/node" -} - -tmux_install(){ - echo :Installing TMUX - mkdir -p "$APPSUPPORT/bin" - - if [ $os = "darwin" ]; then - cd "$INSTALL_DIR" - python rudix.py -i libevent-2.0.21-0.pkg - python rudix.py -i tmux-1.9-0.pkg - - if ! type "/usr/local/bin/tmux"; then - echo "Installation Failed" - exit 100 - fi - - ln -sf "/usr/local/bin/tmux" "$APPSUPPORT/bin/tmux" - # Linux - else - echo "Unsupported" - fi -} - -vfsextend(){ - echo :Installing VFS extend - cd "$INSTALL_DIR" - tar xvfz c9-vfs-extend.tar.gz - rm -Rf "$APPSUPPORT/c9-vfs-extend" - mv c9-vfs-extend "$APPSUPPORT" -} - -sc(){ - echo :Installing Sauce Connect - cd "$INSTALL_DIR" - tar xvzf sc-4.0-latest.tar.gz - rm -rf "$APPSUPPORT/sc" - mv sc-4.0-latest "$APPSUPPORT/sc" -} - -nak(){ - echo :Installing Nak - cd "$INSTALL_DIR" - tar -zxvf nak.tar.gz - mkdir -p "$APPSUPPORT/node_modules/.bin" - rm -Rf "$APPSUPPORT/node_modules/nak" - mv nak "$APPSUPPORT/node_modules" - ln -s "$APPSUPPORT/node_modules/nak/bin/nak" "$APPSUPPORT/node_modules/.bin/nak" &2> /dev/null -} - -ptyjs(){ - echo :Installing pty.js - cd "$INSTALL_DIR" - tar -zxvf pty-$NODE_VERSION-$1-$2.tar.gz - mkdir -p "$APPSUPPORT/node_modules" - rm -Rf "$APPSUPPORT/node_modules/pty.js" - mv pty.js "$APPSUPPORT/node_modules" -} - -c9cli(){ - if [ -d "/usr/local/bin/" ]; then - chmod +x "$RUNTIME/bin/c9" - ln -s -f "$RUNTIME/bin/c9" /usr/local/bin/c9 - else - echo "unable to add c9cli to the path" - fi -} - -start $@ diff --git a/package.json b/package.json index f078729d..d01fb2de 100644 --- a/package.json +++ b/package.json @@ -49,31 +49,31 @@ }, "licenses": [], "c9plugins": { - "c9.ide.language": "#9f588f9152", - "c9.ide.language.css": "#89deece6c0", - "c9.ide.language.generic": "#50161ba888", - "c9.ide.language.html": "#e393db66ae", - "c9.ide.language.html.diff": "#31965d98b3", - "c9.ide.language.javascript": "#5b6237f875", - "c9.ide.language.javascript.immediate": "#0f7c640825", - "c9.ide.language.javascript.eslint": "#8fbaa9cc96", - "c9.ide.language.javascript.tern": "#3d678a103a", - "c9.ide.language.javascript.infer": "#1ae097af44", - "c9.ide.language.jsonalyzer": "#45a20496be", - "c9.ide.collab": "#116fe74942", - "c9.ide.local": "#d5c324ee5b", - "c9.ide.find": "#be3bca94b7", - "c9.ide.find.infiles": "#462928475c", - "c9.ide.find.replace": "#fe41fa768d", - "c9.ide.run.debug": "#f2d348f27a", + "c9.ide.language": "#854575579b", + "c9.ide.language.css": "#afda1f867c", + "c9.ide.language.generic": "#87a4a44671", + "c9.ide.language.html": "#fa4833e117", + "c9.ide.language.html.diff": "#a7311cfc9f", + "c9.ide.language.javascript": "#26cf518b28", + "c9.ide.language.javascript.immediate": "#9a2cce9121", + "c9.ide.language.javascript.eslint": "#1baacc275b", + "c9.ide.language.javascript.tern": "#a65ad88dd9", + "c9.ide.language.javascript.infer": "#ebb2daf81a", + "c9.ide.language.jsonalyzer": "#c5dfe5fb7e", + "c9.ide.collab": "#b94018ab2b", + "c9.ide.local": "#2bfd7ff051", + "c9.ide.find": "#989c06e6a7", + "c9.ide.find.infiles": "#f98dfef554", + "c9.ide.find.replace": "#e4daf722b8", + "c9.ide.run.debug": "#b48e0147a3", "c9.ide.ace.emmet": "#e5f1a92ac3", "c9.ide.ace.gotoline": "#4d1a93172c", - "c9.ide.ace.keymaps": "#422e83553b", - "c9.ide.ace.repl": "#26bca9ee17", + "c9.ide.ace.keymaps": "#6c4bb65b1f", + "c9.ide.ace.repl": "#ada99852fa", "c9.ide.ace.split": "#0ae0151c78", "c9.ide.ace.statusbar": "#d7b45bb7c3", "c9.ide.ace.stripws": "#34426a03d1", - "c9.ide.behaviors": "#f5aaf10aff", + "c9.ide.behaviors": "#6aad7006a0", "c9.ide.closeconfirmation": "#a28bfd8272", "c9.ide.configuration": "#b8470f4107", "c9.ide.dialog.wizard": "#a588b64050", @@ -83,21 +83,21 @@ "c9.ide.imgeditor": "#08bbc53578", "c9.ide.immediate": "#e9ba147cc2", "c9.ide.installer": "#24e7d6f399", - "c9.ide.mount": "#c9d598b254", - "c9.ide.navigate": "#7985b5a50b", + "c9.ide.mount": "#32e79866ee", + "c9.ide.navigate": "#64156c7f4a", "c9.ide.newresource": "#9a7464cc47", "c9.ide.openfiles": "#28a4f5af16", "c9.ide.preview": "#3c4dded23f", "c9.ide.preview.browser": "#be197b0464", "c9.ide.preview.markdown": "#bf952685f6", - "c9.ide.pubsub": "#7dd0a37571", + "c9.ide.pubsub": "#92ec19ed3a", "c9.ide.readonly": "#f6f07bbe42", "c9.ide.recentfiles": "#7c099abf40", "c9.ide.remote": "#37773d905b", "c9.ide.run": "#0a8cc7f0a9", "c9.ide.run.build": "#6726030127", "c9.ide.save": "#a32a8f4346", - "c9.ide.terminal.monitor": "#8e025b3ae1", + "c9.ide.terminal.monitor": "#df9936daa2", "c9.ide.theme.flat": "#5c7c27ab74", "c9.ide.threewaymerge": "#229382aa0b", "c9.ide.undo": "#b028bcb4d5",