Last active
August 19, 2021 12:30
-
-
Save tst32/197ee07212fc2e1785a8d62acee8cf1e to your computer and use it in GitHub Desktop.
get and export as variables all needed info for distro update repo string, call from .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# get and export as variables distroname, codename, releasenum and arch all needed info for distro update repo string, call from .bashrc | |
export distro=`lsb_release -i 2>/dev/null|awk '{print $3}'` | |
export codename=`lsb_release -c 2>/dev/null|awk '{print $2}'` | |
export version=`lsb_release -r 2>/dev/null|awk '{print $2}'` | |
export arch=`dpkg --print-architecture` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment