Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide keychain version on startup (except when called with --version flag) #132

Open
finex opened this issue Sep 27, 2021 · 3 comments
Open

Comments

@finex
Copy link

finex commented Sep 27, 2021

Hi, currently every time the keychain script is invoked it prints the version and the funtoo.org link. I'd like to strip that row in order to compact the output. it should be printed only when the "--version" flag is used.

@finex
Copy link
Author

finex commented Sep 27, 2021

Example patch:

diff --git a/keychain b/keychain
index 0eee68f..62cb2b8 100755
--- a/keychain
+++ b/keychain
@@ -1399,7 +1399,7 @@ fi
 $color || unset BLUE CYAN CYANN GREEN PURP OFF RED

 qprint #initial newline
-mesg "${PURP}keychain ${OFF}${CYANN}${version}${OFF} ~ ${GREEN}http://www.funtoo.org${OFF}"
+[ "$myaction" = version ] && { mesg "${PURP}keychain ${OFF}${CYANN}${version}${OFF} ~ ${GREEN}http://www.funtoo.org${OFF}"; }
 [ "$myaction" = version ] && { versinfo; exit 0; }
 [ "$myaction" = help ] && { versinfo; helpinfo; exit 0; }

diff --git a/keychain.sh b/keychain.sh
index f9465b3..5883ed1 100755
--- a/keychain.sh
+++ b/keychain.sh
@@ -1218,7 +1218,7 @@ fi
 $color || unset BLUE CYAN CYANN GREEN PURP OFF RED

 qprint #initial newline
-mesg "${PURP}keychain ${OFF}${CYANN}${version}${OFF} ~ ${GREEN}http://www.funtoo.org${OFF}"
+[ "$myaction" = version ] && { mesg "${PURP}keychain ${OFF}${CYANN}${version}${OFF} ~ ${GREEN}http://www.funtoo.org${OFF}"; }
 [ "$myaction" = version ] && { versinfo; exit 0; }
 [ "$myaction" = help ] && { versinfo; helpinfo; exit 0; }

@mrl5
Copy link

mrl5 commented Jul 16, 2022

hello @finex - if you'd like to report a bug kindly use https://bugs.funtoo.org/

you can also reach us on Discord - for more info check https://www.funtoo.org/Welcome

@finex
Copy link
Author

finex commented Jul 17, 2022

Thank you very much @mrl5 :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants