Explorar o código

Move backup folder to home, create home bin folder

`/tmp` is not a guaranteed location, home is. `~/bin` is created for the
installation of `ack`.
Weiyi Lou %!s(int64=10) %!d(string=hai) anos
pai
achega
e3a18c2425
Modificáronse 1 ficheiros con 6 adicións e 7 borrados
  1. 6 7
      setup.sh

+ 6 - 7
setup.sh

@@ -13,10 +13,6 @@
 
 # Support Functions {{{
 
-# Folder for backing up present configuration files.
-backup_dir="/tmp/$(date)"
-mkdir "$backup_dir"
-
 # Backup a given file.
 backup() {
   [ -e "$1" ] && mv "$1" "$backup_dir"
@@ -36,10 +32,14 @@ install_vim_plugins() {
 
 # }}}
 
+# Prepare folders
+backup_dir=~/.dotfilesbackup/$(date)
+mkdir -p "$backup_dir" ~/bin ~/.config ~/.ssh
+echo "Prepared folders."
+
 # Make known_hosts file if none
-mkdir -p ~/.ssh
 touch ~/.ssh/known_hosts
-echo "We touched all the known hosts."
+echo "Touched known hosts."
 
 # Git config
 git config --global color.ui true
@@ -81,7 +81,6 @@ linkup ~/dotfiles/bin/ack ~/bin/ack
 echo "Ack linked."
 
 # Powerline
-mkdir -p ~/.config
 linkup ~/dotfiles/powerline/config ~/.config/powerline
 echo "Powerline linked."