Last active
December 26, 2016 09:46
-
-
Save hypersymmetry/731ff03393bff846f37884287d267e4b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# https://charukiewi.cz/posts/chromebook-pixel/ | |
sudo sh ~/Downloads/crouton -t core,xiwi,keyboard,x11,cli-extra,extension,audio -r trusty | |
# chroot stuff | |
sudo apt-get install software-properties-common python-software-properties \ | |
curl nano nautilus tmux tree unzip | |
# http://www.hamvocke.com/blog/a-quick-and-easy-guide-to-tmux/ | |
# http://www.hamvocke.com/blog/a-guide-to-customizing-your-tmux-conf/ | |
# https://www.sitepoint.com/tmux-a-simple-start/ | |
# http://superuser.com/questions/209437/how-do-i-scroll-in-tmux | |
sudo apt-get install libapr1 libaprutil1 libltdl-dev libxml2-dev libxslt1-dev | |
# http://superuser.com/questions/740930/apt-get-upgrade-openssl-wont-bring-ubuntu-12-04-to-latest-version | |
sudo apt-get install --reinstall libssl1.0.0 | |
# Git / Github Config | |
# https://help.github.com/articles/generating-an-ssh-key/ | |
# http://stackoverflow.com/questions/35612504/issue-on-adding-ssh-key-to-github/35612579 | |
sudo apt-get install git | |
# git config — global user.name “Your Actual Name” | |
# git config — global user.email “Your Actual Email” | |
curl -Ok https://gist.githubusercontent.com/hypersymmetry/6526a1c59bd0d6cd8c568504a3e56bf4/raw/99b64cc8584c2abafbf935d20352a96d06b5e8a3/.gitconfig | |
echo -e "\033[0;34mEdit this config file with account info (user.name / user.email) | |
\033[0m\nExample: nano ~/.gitconfig" | |
ssh-keygen -t rsa -b 4096 -C "$(git config --global user.email)" | |
echo -e "\033[0;34mAdd this SSH key to Github settings:\033[0;33m" && cat ~/.ssh/id_rsa.pub && echo -e "\033[0m" | |
# NPM / Node.js | |
# http://askubuntu.com/questions/594656/how-to-install-the-latest-versions-of-nodejs-and-npm-for-ubuntu-14-04-lts | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 68576280 | |
# lsb_release -sc: Replace with Ubuntu equivalent when on other distros (eg. Elementary OS) | |
# sudo apt-add-repository "deb https://deb.nodesource.com/node_7.x $(lsb_release -sc) main" | |
curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - | |
sudo apt-get update | |
sudo apt-get install build-essential nodejs | |
npm config set prefix '~/.npm-packages' | |
echo 'export PATH="$PATH:$HOME/.npm-packages/bin"' >> ~/.bashrc | |
npm install -g bower grunt gulp ember-cli | |
# RVM / Ruby / Rails/Jekyll/Bundler | |
# https://www.digitalocean.com/community/tutorials/how-to-install-ruby-on-rails-on-ubuntu-14-04-using-rvm | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
\curl -sSL https://get.rvm.io | bash -s stable --rails | |
source /home/$USER/.rvm/scripts/rvm | |
gem install rails jekyll bundler | |
# VLC | |
sudo add-apt-repository -y ppa:videolan/stable-daily | |
sudo apt-get update | |
sudo apt-get install vlc # browser-plugin-vlc | |
# Spotify | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 | |
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list | |
sudo apt-get install spotify-client | |
# ZSH / ohmyzsh | |
sudo apt-get install zsh | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# Change ZSH_THEME | |
# mh, kolo, nanotech |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#MyDearFreya v0.04 | |
chroot () { | |
echo 'Installing software-properties-common...' | |
sudo apt-get -y -qq install software-properties-common | |
echo 'Adding Elementary OS repositories...' | |
sudo apt-add-repository -y ppa:elementary-os/os-patches | |
sudo apt-add-repository -y ppa:elementary-os/stable | |
echo 'Updating package lists...' | |
sudo apt-get -qq update | |
echo 'Performing distribution upgrade...' | |
sudo apt-get -y -qq dist-upgrade | |
echo 'Installing elementary-desktop... this will take some time...' | |
sudo apt-get -y -qq install elementary-desktop | |
echo 'Installing some UI tweaks...' | |
#dbus-launch gsettings set org.gnome.settings-daemon.peripherals.touchpad disable-while-typing true | |
dbus-launch gsettings set org.gnome.settings-daemon.peripherals.touchpad tap-to-click true | |
dbus-launch gsettings set org.gnome.settings-daemon.peripherals.touchpad motion-acceleration 5.0 | |
dbus-launch gsettings set org.gnome.desktop.interface cursor-size 48 | |
sudo add-apt-repository -y ppa:mpstark/elementary-tweaks-daily | |
sudo apt-get update | |
sudo apt-get install elementary-tweaks | |
echo 'Fixing permissions...' | |
sudo chown -R watson:watson /home/watson/.cache | |
sudo chown -R watson:watson /home/watson/.config | |
sudo sed -i '1s/^/iface wlan0 inet manual\n/' /etc/network/interfaces | |
echo 'Creating your startelementary scripts...' | |
cd /usr/bin | |
echo '#!/bin/sh | |
exec xinit /usr/bin/xinit_pantheon' | sudo tee startelementary | |
sudo chmod +x startelementary | |
sudo chown root:root startelementary | |
echo '#!/bin/sh | |
gnome-session --session=pantheon' | sudo tee xinit_pantheon | |
sudo chmod +x xinit_pantheon | |
sudo chown root:root xinit_pantheon | |
echo 'Returing to ChromeOS...' | |
sleep 5 | |
exit | |
} | |
chrome () { | |
sh -e crouton -r trusty -t audio,cli-extra,keyboard,touch,extension,xiwi,xorg -n watson | |
echo ================================================== | |
echo ================================================== | |
sleep 5 | |
echo 'Entering your chroot' | |
sudo enter-chroot -u root -n watson sudo sh ~/Downloads/watson.sh installelementary | |
sleep 5 | |
echo '#!/bin/sh -e | |
# Copyright (c) 2014 The crouton Authors. All rights reserved. | |
# Use of this source code is governed by a BSD-style license that can be | |
# found in the LICENSE file. | |
set -e | |
APPLICATION="${0##*/}" | |
USAGE="$APPLICATION [options] | |
Wraps enter-chroot to start an Xfce session. | |
By default, it will log into the primary user on the first chroot found. | |
Options are directly passed to enter-chroot; run enter-chroot to list them." | |
exec sh -e "`dirname "\`readlink -f "$0"\`"`/enter-chroot" -n watson "$@" "" \ | |
exec startelementary' | sudo tee /usr/local/bin/startelementary &> /dev/null | |
sudo chown root:root /usr/local/bin/startelementary | |
sudo chmod +x /usr/local/bin/startelementary | |
sleep 5 | |
echo 'All done setting up Elementary OS Freya...' | |
echo 'Type sudo startelementary to enter your new crouton' | |
} | |
extras () { | |
echo "deb http://archive.canonical.com/ubuntu trusty partner | |
deb-src http://archive.canonical.com/ubuntu trusty partner | |
deb http://repository.spotify.com testing non-free" | sudo tee -a /etc/apt/sources.list &> /dev/null | |
sleep 2 | |
sudo add-apt-repository -y ppa:videolan/stable-daily | |
sudo add-apt-repository -y ppa:otto-kesselgulasch/gimp | |
sudo add-apt-repository -y ppa:webupd8team/java | |
# Signing Key for Ruby | |
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
# Signing Key for Spotify | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 94558F59 | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886 | |
# Get new packages | |
sudo apt-get update | |
sudo apt-get remove -y brasero geary gnome-orca indicator-messages maya-calendar midori* onboard shotwell* telepathy* totem xfce* xscreensaver | |
#sudo apt-get install arj faac faad ffmpeg2theora flac icedax id3v2 lame liba52-0.7.4-dev libflac++6 libmpeg3-1 libswscale-extra-2 libxine1-ffmpeg mencoder mpack mpeg2dec mpeg3-utils mpegdemux mpg123 mpg321 oracle-java8-installer p7zip-rar rar sharutils sox unace uudeview uudeview vorbis-tools | |
# https://medium.com/@GOODROOT/google-pixel-2015-development-guide-6d05826bc4d1#.y1aqkr5o3 | |
sudo apt-get install autoconf automake bison build-essential browser-plugin-vlc curl firefox gimp gimp-data gimp-plugin-registry gimp-data-extras git git-core gtk2-engines-pixbuf libapr1 libaprutil1 libc6-dev libltdl-dev libreadline6 libsqlite3-dev libssl-dev libtool libxml2-dev libxslt-dev libxslt1-dev libyaml-dev nano ncurses-dev nodejs npm openjdk-7-jre openssl skype sqlite3 ubuntu-restricted-extras vlc zlib1g | |
#TODO: Prompt for git configuration | |
# git config — global user.name “Brandon Lawrence” | |
# git config — global user.email “blawrence@mavs.uta.edu” | |
# git config --global core.editor nano | |
# https://help.github.com/articles/generating-an-ssh-key/ | |
#TODO: Fix errors | |
# wget -q https://github.com/atom/atom/releases/latest -O /tmp/latest | |
# wget -q $(awk -F '[<>]' '/href=".*atom-amd64.deb/ {match($0,"href=\"(.*.deb)\"",a); print "https://github.com/" a[1]} ' /tmp/latest) -O /tmp/atom-amd64.deb | |
# dpkg -i /tmp/atom-amd64.deb | |
# sleep 2 | |
# sh -c "$(curl -fsSL https://get.rvm.io) -s stable --rails" | |
curl -sSL https://get.rvm.io | bash | |
source /home/watson/.rvm/scripts/rvm | |
rvm install 2.2 | |
rvm use 2.2 | |
rvm --default use 2.2 | |
gem install ruby | |
sudo atp-get install zsh | |
sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" | |
# Change ZSH_THEME | |
# mh, kolo | |
# spotify gcups-connector | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886 | |
echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list | |
sudo apt-get install spotify-client | |
echo "Cleaning Up" && | |
sudo apt-get -f install && | |
sudo apt-get autoremove && | |
sudo apt-get -y autoclean && | |
sudo apt-get -y clean | |
# Notes : | |
# http://howtoubuntu.org/things-to-do-after-installing-ubuntu-14-04-trusty-tahr | |
# http://jeanlouisnguyen.blogspot.ca/2014/01/guide-how-to-install-elementary-os-on.html | |
# http://stackoverflow.com/questions/5947742/how-to-change-the-output-color-of-echo-in-linux | |
# http://stackoverflow.com/questions/226703/how-do-i-prompt-for-input-in-a-linux-shell-script/27875395 | |
# https://disqus.com/home/discussion/wizardryio/the_2015_pixel_development_guide/ | |
# http://www.shellcheck.net/ | |
# https://google.github.io/styleguide/shell.xml | |
# Should probably include http://skycocker.github.io/chromebrew/ | |
} | |
if [ "$1" = "installelementary" ] | |
then chroot | |
elif [ "$1" = "extras" ] | |
then extras | |
else chrome | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment