mirror of
https://github.com/sbrl/bin.git
synced 2018-01-10 21:33:46 +00:00
Start cloudjummper.sh
This commit is contained in:
parent
b817c25bd0
commit
0aa97a13a6
3 changed files with 35 additions and 2 deletions
|
@ -71,3 +71,17 @@ alias getclip='xclip -selection clipboard -o'
|
|||
|
||||
# Ubuntu's inbuilt image previewer. I'll never be able to remember eog...
|
||||
alias image-preview=eog
|
||||
|
||||
# colourise man
|
||||
function _colorman() {
|
||||
env \
|
||||
LESS_TERMCAP_mb=$(printf "\e[1;35m") \
|
||||
LESS_TERMCAP_md=$(printf "\e[1;34m") \
|
||||
LESS_TERMCAP_me=$(printf "\e[0m") \
|
||||
LESS_TERMCAP_se=$(printf "\e[0m") \
|
||||
LESS_TERMCAP_so=$(printf "\e[7;40m") \
|
||||
LESS_TERMCAP_ue=$(printf "\e[0m") \
|
||||
LESS_TERMCAP_us=$(printf "\e[1;33m") \
|
||||
"$@"
|
||||
}
|
||||
function man() { _colorman man "$@"; }
|
||||
|
|
18
cloudjumper.sh
Normal file
18
cloudjumper.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
### Settings ###
|
||||
|
||||
aliases_url="?";
|
||||
|
||||
################
|
||||
|
||||
aliases_tmp_file=$(mktemp --suffix ".cloudjumper.sh");
|
||||
|
||||
curl -o "${aliases_tmp_file}" "${aliases_url}"
|
||||
chmod u+x "${aliases_tmp_file}"
|
||||
|
||||
source "${aliases_tmp_file}"
|
||||
|
||||
|
||||
rm "${aliases_tmp_file}"
|
||||
|
|
@ -11,12 +11,13 @@ echo "> Setting ownership of /usr/local to $USER"
|
|||
sudo chown -R ${USER}:${USER} /usr/local
|
||||
|
||||
echo "> Moving extracted node.js binaries"
|
||||
rm -rf /usr/local/lib/${NODEJS} && mv ${NODEJS} /usr/local/lib
|
||||
if [[ "$(pwd)" -ne "/usr/local/lib" ]]; then
|
||||
rm -rf /usr/local/lib/${NODEJS} && mv ${NODEJS} /usr/local/lib
|
||||
fi
|
||||
|
||||
echo "> Symlinks"
|
||||
sudo rm -f /usr/local/bin/{iojs,node,npm,node-gyp}
|
||||
ln -s /usr/local/lib/${NODEJS}/bin/node /usr/local/bin/node
|
||||
ln -s /usr/local/lib/${NODEJS}/bin/node /usr/local/bin/node
|
||||
ln -s /usr/local/lib/${NODEJS}/bin/npm /usr/local/bin/npm
|
||||
|
||||
echo "node.js version: $(node -v), npm version: $(npm -v)"
|
||||
|
|
Loading…
Reference in a new issue