Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Jul 20, 2022
2 parents c3630ae + 99e8907 commit b630362
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 7 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@ list
prettylist
markdown formatted list the packages available via deb-get. Use this to update README.md
cvslist
csv formatted list the packages available via deb-get. Use this with 3rd party wrappers.
cache
list the contents of the deb-get cache (/var/cache/deb-get)
Expand Down Expand Up @@ -144,6 +147,7 @@ cog.out(pretty_list)
| [<img src=".github/github.png" align="top" width="20" />](https://github.com/OrangeDrangon/android-messages-desktop/) | `android-messages-desktop` | <i>Run Android Messages as a desktop app.</i> |
| [<img src=".github/github.png" align="top" width="20" />](https://antimicrox.github.io/) | `antimicrox` | <i>A graphical program used to map keyboard buttons and mouse controls to a gamepad.</i> |
| [<img src=".github/debian.png" align="top" width="20" />](https://anydesk.com/) | `anydesk` | <i>Access any device at any time. From anywhere. Always secure and fast.</i> |
| [<img src=".github/debian.png" align="top" width="20" />](https://github.com/TheAssassin/AppImageLauncher) | `appimagelauncher` | <i>A free and open source MIT licensed app that makes your Linux desktop AppImage ready. Integrate AppImages to your application launcher with one click, and manage, update and remove them from there.</i> |
| [<img src=".github/debian.png" align="top" width="20" />](https://atom.io/) | `atom` | <i>A hackable text editor for the 21st Century.</i> |
| [<img src=".github/launchpad.png" align="top" width="20" />](https://launchpad.net/~audio-recorder) | `audiorecorder` | <i>Audio recording app that allows for the recording from various sources such as microphones, a system's sound card, or a web browser, and save it to various possible formats.</i> |
| [<img src=".github/debian.png" align="top" width="20" />](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli) | `azure-cli` | <i>Command-line interface used to create and manage Azure resources.</i> |
Expand Down
40 changes: 33 additions & 7 deletions deb-get
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ function usage() {
echo -e "Usage
deb-get {update | upgrade | show pkg | install pkg | reinstall pkg | remove pkg
| purge pkg | search pkg | cache | clean | list | prettylist | help | version}
| purge pkg | search pkg | cache | clean | list | prettylist | csvlist | help | version}
deb-get provides a high-level commandline interface for the package management
system to easily install and update packages published in 3rd party apt
Expand All @@ -22,6 +22,7 @@ search\n\tsearch for the given regex(7) term(s) from the list of available packa
show\n\tshow information about the given package including its install source and update mechanism.\n
list\n\tlist the packages available via deb-get.\n
prettylist\n\tmarkdown formatted list the packages available via deb-get. Use this to update README.md\n
csvlist\n\tcsv formatted list the packages available via deb-get. Use this with 3rd party wrappers.\n
cache\n\tlist the contents of the deb-get cache (/var/cache/deb-get)\n
help\n\tshow this help\n
version\n\tshow deb-get version\n
Expand Down Expand Up @@ -356,6 +357,13 @@ function prettylist_debs() {
done
}

function csvlist_debs() {
for APP in "${APPS[@]}"; do
validate_deb "${APP}"
echo "\"${APP}\",\"${PRETTY_NAME}\",\"${VERSION_INSTALLED}\",\"${ARCHS_SUPPORTED}\",\"${METHOD}\",\"${SUMMARY}\""
done
}

function update_debs() {
local STATUS=""
update_apt
Expand Down Expand Up @@ -1418,7 +1426,7 @@ function deb_vivaldi-stable() {

function deb_gitkraken() {
if [ "${ACTION}" != "prettylist" ]; then
VERSION_PUBLISHED="$(curl -s "https://support.gitkraken.com/release-notes/current/" | grep 'id="version-' | head -n1 | sed -e 's/<[^>]*>//g' | cut -d' ' -f2)"
VERSION_PUBLISHED="$(curl -s "https://help.gitkraken.com/gitkraken-client/current/" | grep 'id="version-' | head -n1 | sed -e 's/<[^>]*>//g' | cut -d' ' -f2)"
fi
URL="https://release.gitkraken.com/linux/gitkraken-amd64.deb"
PRETTY_NAME="GitKraken"
Expand Down Expand Up @@ -1742,7 +1750,7 @@ function deb_openrazer-meta() {

function deb_strawberry() {
if [ "${UPSTREAM_ID}" == "ubuntu" ]; then
PPA="ppa:jonaski/strawberry "
PPA="ppa:jonaski/strawberry"
PRETTY_NAME="Strawberry Music Player"
WEBSITE="https://www.strawberrymusicplayer.org/"
SUMMARY="Music player and music collection organizer aimed at music collectors and audiophiles."
Expand Down Expand Up @@ -1780,9 +1788,9 @@ function deb_terraform() {

function deb_tailscale() {
# TODO: Test with Debian
GPG_KEY_URL="https://pkgs.tailscale.com/stable/ubuntu/${UPSTREAM_CODENAME}.noarmor.gpg"
GPG_KEY_URL="https://pkgs.tailscale.com/stable/${UPSTREAM_ID}/${UPSTREAM_CODENAME}.noarmor.gpg"
APT_LIST_NAME="tailscale"
APT_REPO_URL="deb [signed-by=/usr/share/keyrings/${APT_LIST_NAME}-archive-keyring.gpg] https://pkgs.tailscale.com/stable/ubuntu ${UPSTREAM_CODENAME} main"
APT_REPO_URL="deb [signed-by=/usr/share/keyrings/${APT_LIST_NAME}-archive-keyring.gpg] https://pkgs.tailscale.com/stable/${UPSTREAM_ID} ${UPSTREAM_CODENAME} main"
PRETTY_NAME="Tailscale"
WEBSITE="https://tailscale.com/"
SUMMARY="Zero config VPN. Works on any device, manages firewall rules for you, and works from anywhere."
Expand Down Expand Up @@ -2346,6 +2354,15 @@ function deb_papirus-icon-theme() {
fi
}

function deb_appimagelauncher() {
if [ "${UPSTREAM_ID}" == "ubuntu" ]; then
PPA="ppa:appimagelauncher-team/stable"
PRETTY_NAME="AppImage Launcher"
WEBSITE="https://github.com/TheAssassin/AppImageLauncher"
SUMMARY="A free and open source MIT licensed app that makes your Linux desktop AppImage ready. Integrate AppImages to your application launcher with one click, and manage, update and remove them from there."
fi
}

# Create an array to track those deb_ functions being loaded by this script
readonly DEB_GET_APPS=($(declare -F | grep deb_ | sed 's|declare -f deb_||g' | sort))

Expand Down Expand Up @@ -2406,9 +2423,14 @@ esac

OS_CODENAME=$(lsb_release --codename --short)
if [ -e /etc/os-release ]; then
#Debian VERSION_CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d'=' -f2 | sed 's/"//g')
UPSTREAM_ID="$(grep "^ID=" /etc/os-release | cut -d'=' -f2)"
UPSTREAM_ID_LIKE="$(grep "^ID_LIKE=" /etc/os-release | cut -d'=' -f2 | sed s/\"//g | cut -d' ' -f1)"
if [ ! -z "$UPSTREAM_ID_LIKE" ]; then
UPSTREAM_ID=$UPSTREAM_ID_LIKE
fi
case "${UPSTREAM_ID}" in
debian) UPSTREAM_CODENAME=$(grep DEBIAN_CODENAME /etc/os-release | cut -d'=' -f2);;
debian) UPSTREAM_CODENAME=$(grep VERSION_CODENAME /etc/os-release | cut -d'=' -f2);;
ubuntu) UPSTREAM_CODENAME=$(grep UBUNTU_CODENAME /etc/os-release | cut -d'=' -f2);;
*) UPSTREAM_CODENAME="";;
esac
Expand All @@ -2420,6 +2442,7 @@ case "${UPSTREAM_CODENAME}" in
buster) UPSTREAM_RELEASE="10";;
bullseye) UPSTREAM_RELEASE="11";;
bookworm) UPSTREAM_RELEASE="12";;
sid) UPSTREAM_RELEASE="unstable";;
focal) UPSTREAM_RELEASE="20.04";;
impish) UPSTREAM_RELEASE="21.10";;
jammy) UPSTREAM_RELEASE="22.04";;
Expand Down Expand Up @@ -2453,7 +2476,7 @@ case "${ACTION}" in
ls -lh "${CACHE_DIR}/";;
clean)
elevate_privs
${ELEVATE} rm -v "${CACHE_DIR}"/*.deb;;
${ELEVATE} rm -v "${CACHE_DIR}"/*.deb
${ELEVATE} rm -v "${CACHE_DIR}"/*.json;;
show)
for APP in "${@,,}"; do
Expand Down Expand Up @@ -2484,6 +2507,9 @@ case "${ACTION}" in
pretty_list|prettylist)
ACTION="prettylist"
prettylist_debs;;
csv_list|csvlist|csv)
ACTION="prettylist"
csvlist_debs;;
purge)
elevate_privs
for APP in "${@,,}"; do
Expand Down

0 comments on commit b630362

Please sign in to comment.