Deleted old update script
This commit is contained in:
parent
8c3f361135
commit
8592aad294
2 changed files with 27 additions and 66 deletions
|
@ -1,37 +1,39 @@
|
||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
function main {
|
|
||||||
local old=$1
|
|
||||||
local new=$2
|
|
||||||
local now=`date -R`
|
|
||||||
local author=`git config --get user.name`
|
|
||||||
local email=`git config --get user.email`
|
|
||||||
local username=`git config --get remote.origin.url | sed 's,.*:\(.*\)/.*,\1,'`
|
|
||||||
local tempfile=`tempfile`
|
|
||||||
|
|
||||||
git checkout -b version-$new
|
# This script intends to decrease the effort of updating the package.
|
||||||
|
|
||||||
mv intellij-idea-ultimate_{$old,$new}
|
PACKAGE="intellij-idea-ultimate"
|
||||||
mv intellij-idea-ultimate_{$old,$new}.orig.tar.gz
|
DISTRIBUTION="disco"
|
||||||
|
|
||||||
echo "intellij-idea-ultimate ($new-1) artful; urgency=low
|
main() {
|
||||||
|
old="$1"
|
||||||
|
new="$2"
|
||||||
|
name="$(git config --get user.name)"
|
||||||
|
email="$(git config --get user.email)"
|
||||||
|
|
||||||
* Upstream Version $new
|
git checkout -b version-"$new"
|
||||||
|
|
||||||
-- $author ($username) <$email> $now
|
mv "$PACKAGE"_"$old" "$PACKAGE"_"$new"
|
||||||
" >> $tempfile
|
mv "$PACKAGE"_"$old".orig.tar.gz "$PACKAGE"_"$new".orig.tar.gz
|
||||||
|
|
||||||
cat intellij-idea-ultimate_$new/debian/changelog >> $tempfile
|
cd "$PACKAGE"_"$new" || exit
|
||||||
mv $tempfile intellij-idea-ultimate_$new/debian/changelog
|
|
||||||
|
|
||||||
sed -i "s/$old/$new/g" intellij-idea-ultimate_$new/debian/preinst
|
# Update the debian/changelog file with dch
|
||||||
|
NAME="$name" EMAIL="$email" dch \
|
||||||
|
--newversion "$new"-1 \
|
||||||
|
--distribution "$DISTRIBUTION" \
|
||||||
|
"Upstream version $new"
|
||||||
|
|
||||||
(cd intellij-idea-ultimate_$new/ && debuild -us -uc )
|
sed -i "s/$old/$new/g" ./debian/preinst
|
||||||
|
|
||||||
rm intellij-idea-ultimate_${old}*
|
debuild -us -uc
|
||||||
|
|
||||||
sudo dpkg -i intellij-idea-ultimate_$new-1_all.deb
|
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" "$2"
|
||||||
|
|
||||||
main $1 $2
|
|
||||||
|
|
|
@ -1,41 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
# This is a ongoing rewrite of the update-new-version.sh script.
|
|
||||||
# Most important changes: POSIX compatibility, use of existing commands.
|
|
||||||
# The script intends to decrease the effort of updating the package.
|
|
||||||
|
|
||||||
PACKAGE="intellij-idea-ultimate"
|
|
||||||
DISTRIBUTION="disco"
|
|
||||||
|
|
||||||
main() {
|
|
||||||
old="$1"
|
|
||||||
new="$2"
|
|
||||||
name="$(git config --get user.name)"
|
|
||||||
email="$(git config --get user.email)"
|
|
||||||
|
|
||||||
git checkout -b version-"$new"
|
|
||||||
|
|
||||||
mv "$PACKAGE"_"$old" "$PACKAGE"_"$new"
|
|
||||||
mv "$PACKAGE"_"$old".orig.tar.gz "$PACKAGE"_"$new".orig.tar.gz
|
|
||||||
|
|
||||||
cd "$PACKAGE"_"$new" || exit
|
|
||||||
|
|
||||||
# Update the debian/changelog file with dch
|
|
||||||
NAME="$name" EMAIL="$email" dch \
|
|
||||||
--newversion "$new"-1 \
|
|
||||||
--distribution "$DISTRIBUTION" \
|
|
||||||
"Upstream version $new"
|
|
||||||
|
|
||||||
sed -i "s/$old/$new/g" ./debian/preinst
|
|
||||||
|
|
||||||
debuild -us -uc
|
|
||||||
|
|
||||||
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" "$2"
|
|
Loading…
Reference in a new issue