dots/scripts/Documents/Scripts/versions.sh
2024-04-29 19:05:39 +02:00

17 lines
577 B
Bash
Executable file

#!/bin/sh
# Define a function to get the title
get_title() {
fetch -qo - "https://archlinux.org/packages/extra/x86_64/$1/" | grep -o '<title>Arch Linux - [^<]*' | sed 's/<title>Arch Linux -//' | sed 's/(x86_64)//'
}
# Run fetch and grep for each package
blender_title=$(get_title blender)
godot_title=$(get_title godot)
inkscape_title=$(get_title inkscape)
krita_title=$(get_title krita)
gimp_title=$(get_title gimp)
# Print the titles to a file
printf "%s, %s, %s, %s, %s\n" "$blender_title" "$godot_title" "$inkscape_title" "$krita_title" "$gimp_title" > versions.txt