mirror of
				https://github.com/AquaMorph/dotfiles.git
				synced 2025-11-03 17:03:18 +00:00 
			
		
		
		
	Self updating
This commit is contained in:
		@@ -76,5 +76,18 @@ function dotfiles {
 | 
				
			|||||||
    done
 | 
					    done
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Check dotfiles for updates
 | 
				
			||||||
 | 
					function update {
 | 
				
			||||||
 | 
					    echo Checking for dotfile updates
 | 
				
			||||||
 | 
					    startTime=$(date +%s -r $dotdir)
 | 
				
			||||||
 | 
					    cd $dotdir && git pull
 | 
				
			||||||
 | 
					    endTime=$(date +%s -r $dotdir)
 | 
				
			||||||
 | 
					    if (( "$startTime" < "$endTime" )); then
 | 
				
			||||||
 | 
						sh $dotdir/scripts/install.sh
 | 
				
			||||||
 | 
						exit
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					update
 | 
				
			||||||
dotfiles
 | 
					dotfiles
 | 
				
			||||||
emacs
 | 
					emacs
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user