How about a direct install with bash, curl and github
* Use curl to retrieve the raw install script from github * Execute payload directly with bash -c without requiring file write * Detect bash execution (as apposed to terminal or script file execution) and assume that this is a direct install * On direct install * * purge ~/.bash_it if present * * git clone repo to ~/.bash_it * * continue installation as normalpull/174/head
parent
061cca5304
commit
feb8d098de
|
|
@ -1,8 +1,13 @@
|
|||
#!/usr/bin/env bash
|
||||
# bash-it installer
|
||||
BASH_IT=$(cd ${0%/*} && echo ${PWD})
|
||||
cd "${OLDPWD}"
|
||||
cp "${HOME}/.bash_profile" "${HOME}/.bash_profile.bak"
|
||||
if [ "$0" == "bash" ]; then
|
||||
BASH_IT="${HOME}/.bash_it"
|
||||
[[ -d "${BASH_IT}" ]] && rm -rf "${BASH_IT}"
|
||||
git clone http://github.com/revans/bash-it.git "${BASH_IT}"
|
||||
else
|
||||
BASH_IT=$(cd ${0%/*} && echo ${PWD})
|
||||
fi
|
||||
|
||||
[[ "${BASH_IT}" != "${HOME}/.bash_it" ]] && cp -Rf "${BASH_IT}" "${HOME}/.bash_it"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue