mirror of
				https://github.com/ItsDrike/dotfiles.git
				synced 2025-11-04 09:16:36 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			269 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			269 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/bin/bash
 | 
						|
set -euo pipefail
 | 
						|
 | 
						|
dotdir="$HOME/dots"
 | 
						|
dothome="$dotdir/home"
 | 
						|
dotroot="$dotdir/root"
 | 
						|
syspath="$(realpath "$1")"
 | 
						|
 | 
						|
if [[ "$syspath" == "$HOME"* ]]; then
 | 
						|
  dotpath="${syspath/#$HOME/$dothome}"
 | 
						|
else
 | 
						|
  dotpath="$dotroot$syspath"
 | 
						|
fi
 | 
						|
 | 
						|
cp -vi "$syspath" "$dotpath"
 |