aboutsummaryrefslogtreecommitdiff
path: root/shell/update
diff options
context:
space:
mode:
Diffstat (limited to 'shell/update')
-rw-r--r--shell/update43
1 files changed, 14 insertions, 29 deletions
diff --git a/shell/update b/shell/update
index 0621f2a..a5ad86b 100644
--- a/shell/update
+++ b/shell/update
@@ -1,13 +1,3 @@
-
-pulltermcolors() {
- file="$HOME/bin/terminal-colors"
- if ! [ -d $HOME/bin ] ; then
- mkdir $HOME/bin
- fi
- pull -u ${UPDATE_URL}/terminal-colors -f $file
- chmod +x $file
-}
-
pull() {
url=""
file=""
@@ -31,7 +21,8 @@ pull() {
}
pulldotfile() {
file="$1"
- pull -u "${UPDATE_URL}${file}" -f "$HOME/.${file}"
+ destfile="$(basename "${file}")"
+ pull -u "${UPDATE_URL}${file}" -f "$HOME/.${destfile}"
}
_make_ssh_dir_if_not_exists() {
auth_keys="$HOME/.ssh/authorized_keys"
@@ -63,9 +54,17 @@ pullkeys_github() {
url="https://github.com/${_username}.keys"
_pullkeys "$url"
}
+pulltermcolors() {
+ file="$HOME/bin/terminal-colors"
+ if ! [ -d $HOME/bin ] ; then
+ mkdir $HOME/bin
+ fi
+ pull -u ${UPDATE_URL}/util/terminal-colors -f $file
+ chmod +x $file
+}
updatetmuxconf() {
- pulldotfile "tmux.conf"
- pulldotfile "tmux_helper.sh"
+ pulldotfile "tmux/tmux.conf"
+ pulldotfile "tmux/tmux_helper.sh"
if ! [ -e $HOME/.tmux.conf.local ] && [ `id -u` -eq 0 ] ; then
# If I ever change the color from green this will have to be updated I guess
grep 'green' $HOME/.tmux.conf | sed -e's/green/red/g' > $HOME/.tmux.conf.local
@@ -83,8 +82,8 @@ updateshell() {
}
updatevimrc() {
OLDWD="$(pwd)"
- cd $HOME
- git clone $VIM_GIT_URL .vim
+ cd "$HOME"
+ git clone "$VIM_GIT_URL" .vim
if [ $? -gt 0 ] ; then
cd $HOME/.vim
git pull origin master
@@ -98,20 +97,6 @@ updatevimrc() {
updatevimrc_basic() {
pull -u "$VIM_BASIC_URL" -f ~/.vimrc
}
-placebasicvimrc() {
- if [ -z "$1" ] ; then
- echo All arguments are passed to SSH, but you need at least one
- return
- fi
- _TMP="$(mktemp)"
- if [ -z "$_TMP" ] ; then
- echo Cannot continue, temp file cannot be zero length!;
- return
- fi
- pull -u "$VIM_BASIC_URL" -f "$_TMP"
- cat "$_TMP" | ssh "$@" "cat - > ~/.vimrc"
- rm "$_TMP"
-}