From e92f47f3957789c6b66c75c8ffd5b6520139a462 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 8 Aug 2015 02:35:57 +0200 Subject: [PATCH] Separate dotfiles into those used on thinkpad and those used always. --- {dotfiles => dotfiles_user_minimal}/bash_profile | 0 {dotfiles => dotfiles_user_minimal}/bashrc | 0 {dotfiles => dotfiles_user_minimal}/gitconfig | 0 {dotfiles => dotfiles_user_minimal}/vimrc | 0 {dotfiles => dotfiles_user_thinkpad}/i3/config | 0 {dotfiles => dotfiles_user_thinkpad}/i3status.conf | 0 {dotfiles => dotfiles_user_thinkpad}/pentadactylrc | 0 {dotfiles => dotfiles_user_thinkpad}/xinitrc | 0 jessie_start.sh | 2 +- symlink.sh | 12 +++++++++--- 10 files changed, 10 insertions(+), 4 deletions(-) rename {dotfiles => dotfiles_user_minimal}/bash_profile (100%) rename {dotfiles => dotfiles_user_minimal}/bashrc (100%) rename {dotfiles => dotfiles_user_minimal}/gitconfig (100%) rename {dotfiles => dotfiles_user_minimal}/vimrc (100%) rename {dotfiles => dotfiles_user_thinkpad}/i3/config (100%) rename {dotfiles => dotfiles_user_thinkpad}/i3status.conf (100%) rename {dotfiles => dotfiles_user_thinkpad}/pentadactylrc (100%) rename {dotfiles => dotfiles_user_thinkpad}/xinitrc (100%) diff --git a/dotfiles/bash_profile b/dotfiles_user_minimal/bash_profile similarity index 100% rename from dotfiles/bash_profile rename to dotfiles_user_minimal/bash_profile diff --git a/dotfiles/bashrc b/dotfiles_user_minimal/bashrc similarity index 100% rename from dotfiles/bashrc rename to dotfiles_user_minimal/bashrc diff --git a/dotfiles/gitconfig b/dotfiles_user_minimal/gitconfig similarity index 100% rename from dotfiles/gitconfig rename to dotfiles_user_minimal/gitconfig diff --git a/dotfiles/vimrc b/dotfiles_user_minimal/vimrc similarity index 100% rename from dotfiles/vimrc rename to dotfiles_user_minimal/vimrc diff --git a/dotfiles/i3/config b/dotfiles_user_thinkpad/i3/config similarity index 100% rename from dotfiles/i3/config rename to dotfiles_user_thinkpad/i3/config diff --git a/dotfiles/i3status.conf b/dotfiles_user_thinkpad/i3status.conf similarity index 100% rename from dotfiles/i3status.conf rename to dotfiles_user_thinkpad/i3status.conf diff --git a/dotfiles/pentadactylrc b/dotfiles_user_thinkpad/pentadactylrc similarity index 100% rename from dotfiles/pentadactylrc rename to dotfiles_user_thinkpad/pentadactylrc diff --git a/dotfiles/xinitrc b/dotfiles_user_thinkpad/xinitrc similarity index 100% rename from dotfiles/xinitrc rename to dotfiles_user_thinkpad/xinitrc diff --git a/jessie_start.sh b/jessie_start.sh index 781ef43..9a92ce7 100755 --- a/jessie_start.sh +++ b/jessie_start.sh @@ -71,7 +71,7 @@ config/symlink.sh useradd -m -s /bin/bash plom rm -rf /home/plom/config su - plom -c 'git clone http://github.com/plomlompom/config /home/plom/config' -su plom -c /home/plom/config/symlink.sh +su plom -c '/home/plom/config/symlink.sh thinkpad' # Set up editor. apt-get -y install vim diff --git a/symlink.sh b/symlink.sh index 1b966ef..8a5488e 100755 --- a/symlink.sh +++ b/symlink.sh @@ -2,13 +2,19 @@ set -x -dir=~/config/dotfiles +dir_user_minimal=~/config/dotfiles_user_minimal +dir_user_thinkpad=~/config/dotfiles_user_thinkpad dir_root=~/config/dotfiles_root homedir=`echo ~` find ~ -lname $homedir'/config/*' -delete -for file in `ls $dir`; do - ln -s $dir/$file ~/.$file +for file in `ls $dir_user_minimal`; do + ln -s $dir_user_minimal/$file ~/.$file done +if [ "$1" = "thinkpad" ]; then + for file in `ls $dir_user_thinkpad`; do + ln -s $dir_user_thinkpad/$file ~/.$file + done +fi if [ "$(id -u)" -eq "0" ]; then for file in `ls $dir_root`; do ln -fs $dir_root/$file ~/.$file -- 2.30.2