Refactored update scripts; build for Jammy
This commit is contained in:
parent
af56394f71
commit
bab9e8476a
1 changed files with 31 additions and 29 deletions
|
@ -1,11 +1,19 @@
|
|||
#!/bin/sh
|
||||
|
||||
#!/bin/bash
|
||||
#
|
||||
# This script intends to decrease the effort of updating the package.
|
||||
|
||||
PACKAGE="intellij-idea-ultimate"
|
||||
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-ultimate"
|
||||
DISTRIBUTION="jammy"
|
||||
|
||||
main() {
|
||||
last_tag=$(git describe --abbrev=0 --tags)
|
||||
old="${last_tag#?}"
|
||||
new="$1"
|
||||
|
@ -32,10 +40,4 @@ main() {
|
|||
|
||||
cd ..
|
||||
|
||||
rm -rf "$PACKAGE"_"$old"-*
|
||||
|
||||
# disabled until it is only called with an specific argument
|
||||
# sudo dpkg -i "$PACKAGE"_"$new"-1_all.deb
|
||||
}
|
||||
|
||||
main "$1"
|
||||
rm "$PACKAGE"_"$old"-*
|
||||
|
|
Loading…
Reference in a new issue