22 lines
		
	
	
		
			553 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			553 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| run_directory=$(dirname "$0")
 | |
| user=$(whoami)
 | |
| 
 | |
| if [ -f $run_directory/.disabled ]; then
 | |
|   echo "Installation is disabled. Exiting..."
 | |
|   exit 0
 | |
| fi
 | |
| 
 | |
| if [ ! -d /home/$user/.bashrc.d ]; then
 | |
|   echo "~/.bashrc.d does not exist. Creating it..."
 | |
|   mkdir /home/$user/.bashrc.d
 | |
| fi
 | |
| 
 | |
| echo "Copying bashrc-ffarchiving to extensions directory..."
 | |
| cp $run_directory/templates/bashrc-ffarchiving /home/$user/.bashrc.d/
 | |
| sed -i -e "s:PH_DIRECTORY:$run_directory:g" /home/$user/.bashrc.d/bashrc-ffarchiving
 | |
| 
 | |
| echo "Finished install. Exiting..."
 | |
| exit 0
 |