29 lines
		
	
	
	
		
			835 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
	
		
			835 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable file
		
	
	
	
	
#!/usr/bin/env sh
 | 
						|
 | 
						|
echo "Loading environment variables"
 | 
						|
. "$HOME/.config/environment"
 | 
						|
 | 
						|
if [ ! -x "$(command -v autoinstall)" ];
 | 
						|
then
 | 
						|
  echo "Installing autoinstall command"
 | 
						|
  mkdir -p "$HOME/.local/bin"
 | 
						|
  curl -Lo "$HOME/.local/bin/autoinstall" https://git.serguzim.me/serguzim/tools/releases/download/latest/autoinstall
 | 
						|
  chmod +x "$HOME/.local/bin/autoinstall"
 | 
						|
fi
 | 
						|
 | 
						|
if [ ! -x "$(command -v yadm)" ];
 | 
						|
then
 | 
						|
  echo "Installing yadm command"
 | 
						|
  autoinstall exe "https://github.com/TheLocehiliosan/yadm/raw/master/yadm" "yadm"
 | 
						|
fi
 | 
						|
 | 
						|
echo "Configuring yadm"
 | 
						|
yadm gitconfig core.bare false
 | 
						|
yadm gitconfig core.worktree "$HOME"
 | 
						|
yadm gitconfig status.showUntrackedFiles no
 | 
						|
yadm remote set-url --push origin "git@git.serguzim.me:serguzim/.dotfiles.git"
 | 
						|
 | 
						|
echo "Autoinstalling base"
 | 
						|
autoinstall run base
 | 
						|
 | 
						|
echo "Don't forget to decrypt yadm secrets"
 |