From 5de26309f71d15b4925a27dfcc2c6834d73d9e2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Mon, 15 Oct 2018 14:29:14 +0200 Subject: [PATCH] Add NVM to be installed on all systems --- .hyper_plugins/.hyper_plugins | 2 +- .setenv.sh | 2 +- common/configure_fresh_system.sh | 7 +++++++ ubuntu/up.sh | 3 ++- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.hyper_plugins/.hyper_plugins b/.hyper_plugins/.hyper_plugins index b13f2cdb..742c57d0 120000 --- a/.hyper_plugins/.hyper_plugins +++ b/.hyper_plugins/.hyper_plugins @@ -1 +1 @@ -/Users/cyplo/dev/dotfiles/.hyper_plugins \ No newline at end of file +/home/cyryl/dev/dotfiles/.hyper_plugins \ No newline at end of file diff --git a/.setenv.sh b/.setenv.sh index 08392f8b..ef4b1c31 100644 --- a/.setenv.sh +++ b/.setenv.sh @@ -15,7 +15,7 @@ export KEYTIMEOUT=1 export VAGRANT_DEFAULT_PROVIDER=virtualbox export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow --glob "!.git/*"' export NVM_DIR="$HOME/.nvm" + [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion - diff --git a/common/configure_fresh_system.sh b/common/configure_fresh_system.sh index dca88bdc..1ffb213a 100755 --- a/common/configure_fresh_system.sh +++ b/common/configure_fresh_system.sh @@ -1,4 +1,6 @@ #!/bin/bash +set -e +set -o pipefail SUDO="" if [[ -z $NOSUDO ]]; then @@ -60,7 +62,12 @@ mkdir -p ~/.config/Code/User ln -vfs "$DIR/.config/Code/User/settings.json" ~/.config/Code/User/settings.json ln -vfs "$DIR/.config/Code/User/keybindings.json" ~/.config/Code/User/keybindings.json mkdir -p ~/.cargo/ +echo "all links done" +echo "adding NVM" +curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash + +echo "sourcing env" source ~/.setenv # symlink 'nodejs' as node on some systems diff --git a/ubuntu/up.sh b/ubuntu/up.sh index 51c6909b..a57f791a 100755 --- a/ubuntu/up.sh +++ b/ubuntu/up.sh @@ -5,7 +5,7 @@ set -v sudo apt-get update sudo apt-get -y upgrade -sudo apt-get -y --fix-missing install apt-file aptitude aria2 atop cmake curl dkms freecad gajim git glances gnupg2 golang gparted gsmartcontrol intltool kdiff3 keepass2 libatk1.0-dev libbonoboui2-dev libcairo2-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libncurses5-dev libx11-dev libxpm-dev libxt-dev linux-kernel-headers lm-sensors meld mercurial nodejs npm pv python-dev python-pip python3-pip retext ruby-dev silversearcher-ag solaar terminator tmux vim whois zsh dirmngr fail2ban glances atop syncthing evolution docker.io yasm libfuse-dev libwxgtk3.0-dev net-tools software-properties-common coreutils +sudo apt-get -y --fix-missing install apt-file aptitude aria2 atop cmake curl dkms freecad gajim git glances gnupg2 golang gparted gsmartcontrol intltool kdiff3 keepass2 libatk1.0-dev libbonoboui2-dev libcairo2-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libncurses5-dev libx11-dev libxpm-dev libxt-dev linux-kernel-headers lm-sensors meld mercurial nodejs npm pv python-dev python-pip python3-pip retext ruby-dev terminator tmux vim whois zsh dirmngr fail2ban glances atop syncthing evolution docker.io yasm libfuse-dev libwxgtk3.0-dev net-tools software-properties-common coreutils if [[ -z $USER ]]; then USER=`whoami` @@ -26,6 +26,7 @@ if [[ -z $NO_SYSTEMCTL ]]; then sudo systemctl restart docker sudo systemctl enable fail2ban sudo systemctl restart fail2ban + sudo systemctl enable --now syncthing@cyryl.service fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"