Refactored update scripts; build for Jammy

This commit is contained in:
Marcel Kapfer 2022-07-20 16:10:26 +02:00
parent 7b337d8d0b
commit 987b1278ff
Signed by: mmk2410
GPG Key ID: CADE6F0C09F21B09
1 changed files with 31 additions and 29 deletions

View File

@ -1,11 +1,19 @@
#!/bin/sh
#!/bin/bash
#
# This script intends to decrease the effort of updating the package.
PACKAGE="intellij-idea-community"
DISTRIBUTION="impish"
set -euo pipefail
# Check if running Ubuntu
grep -q Ubuntu /etc/issue
if [[ $? != 0 ]]; then
echo "System is not running Ubuntu. Cancelling build."
exit 1
fi
PACKAGE="intellij-idea-community"
DISTRIBUTION="jammy"
main() {
last_tag=$(git describe --abbrev=0 --tags)
old="${last_tag#?}"
new="$1"
@ -33,9 +41,3 @@ main() {
cd ..
rm "$PACKAGE"_"$old"-*
# disabled until it is only called with an specific argument
# sudo dpkg -i "$PACKAGE"_"$new"-1_all.deb
}
main "$1"