mirror of
				https://github.com/AquaMorph/dotfiles.git
				synced 2025-10-31 15:43:19 +00:00 
			
		
		
		
	Installed package searching
This commit is contained in:
		| @@ -34,6 +34,11 @@ function checkUptoDate() { | ||||
|     fi | ||||
| } | ||||
|  | ||||
| # Returns installed programs with a given name. | ||||
| function searchProgramInstalled() { | ||||
|     sudo dnf list | grep $1 | ||||
| } | ||||
|  | ||||
| # Filters string to Semantic Versioning. | ||||
| function filterVersion() { | ||||
|     grep -Po -m 1 '\d{1,4}\.\d{1,4}\.*\d{0,4}' | ||||
|   | ||||
| @@ -5,7 +5,7 @@ | ||||
| # Import library | ||||
| source $(dirname ${BASH_SOURCE[0]})/install-lib.sh | ||||
|  | ||||
| keeweb=$(sudo dnf list | grep KeeWeb) | ||||
| keeweb=$(searchProgramInstalled KeeWeb) | ||||
| keewebVersion=$(echo $keeweb | awk '{print $2;}' | filterVersion) | ||||
| url=$(curl -s https://github.com/keeweb/keeweb/releases | grep .rpm | grep -Po '(?<=href=")[^"]*.rpm'| head -n 1) | ||||
| url='https://github.com'$url | ||||
|   | ||||
		Reference in New Issue
	
	Block a user