mirror of
				https://github.com/frebib/dotfiles.git
				synced 2024-06-14 12:57:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			531 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			531 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| set -e
 | |
| 
 | |
| cd `dirname ${BASH_SOURCE[0]}`
 | |
| source ../.profile
 | |
| 
 | |
| cd $HOME
 | |
| echo cd `pwd`
 | |
| 
 | |
| files=`ls -A $DOTFILES | awk '/^\..*/ && !/\.config$/ && !/\.git$/ && !/\.gitignore$/'`
 | |
| homepath=`echo $DOTFILES | sed "s|$HOME/||g"`
 | |
| conffiles=`ls -A "$DOTFILES/.config"`
 | |
| confpath=`echo $homepath | sed "s|.config/||g"`
 | |
| userhome=$HOME
 | |
| 
 | |
| for file in $files; do
 | |
|     ln -sfv $homepath/$file .
 | |
| done
 | |
| ln -sfv .profile .zprofile
 | |
| 
 | |
| mkdir -p .config && cd .config/
 | |
| echo cd `pwd`
 | |
| for file in $conffiles; do
 | |
|     ln -sfv $confpath/.config/$file .
 | |
| done
 |