21 lines
		
	
	
		
			371 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
			
		
		
	
	
			21 lines
		
	
	
		
			371 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
#!/bin/bash
 | 
						|
 | 
						|
if [ ! -d ~/.zk ]; then
 | 
						|
    echo "[zk] Setting up zettelkasten"
 | 
						|
    gh repo clone zk ~/.zk
 | 
						|
else
 | 
						|
    echo "[zk] Zettelkasten already set up."
 | 
						|
fi
 | 
						|
 | 
						|
read -p "Would you like open your zettelkasten? [y/N] " -n 1 -r
 | 
						|
echo
 | 
						|
 | 
						|
if [[ $REPLY =~ ^[Yy]$ ]]; then
 | 
						|
  if command -v zk &>/dev/null; then
 | 
						|
    zk
 | 
						|
  else
 | 
						|
    echo "Error: 'zk' command not found"
 | 
						|
    exit 1
 | 
						|
  fi
 | 
						|
fi
 |