Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -z "$1" ]; then
- echo "Usage: $0 lp:~elementary-os/SOMEPROJECT/deb-packaging"
- exit 1
- fi
- set -e
- project_name=$(echo "$1" | cut -d '/' -f 2)
- target_dir="$(mktemp -d)"
- bzr export "$target_dir" "$1"
- cd "$target_dir"
- package_name=$(grep 'Source:' debian/control | cut -d ':' -f 2-)
- description=$(grep -m 1 'Description:' debian/control | cut -d ':' -f 2-)
- license=$(grep -m 1 'License:' debian/copyright | cut -d ':' -f 2-)
- version=$(grep -m 1 '(' debian/changelog | cut -d '(' -f 2- | cut -d ')' -f 1 | cut -d '-' -f 1)
- msg_tempfile="$(mktemp)"
- echo "Package: wnpp
- Owner: Sergey \"Shnatsel\" Davidoff <sergey@elementaryos.org>
- Severity: wishlist
- * Package name : $package_name
- Version : $version
- Upstream Author : elementary Developers
- * URL : https://launchpad.net/$project_name
- * License : $license
- Programming Lang: Vala
- Description : $description
- This is a part of my Google Summer of Code project on packaging elementary software for Debian, see https://wiki.debian.org/SummerOfCode2014/Projects/PackageElementarySoftware for more information.
- " > "$msg_tempfile"
- nano "$msg_tempfile"
- echo -n "Submit the ITP to Debian bug tracking system? [y/N]: "
- read
- if ( echo "$REPLY" | grep -q -i 'y' ); then
- cat "$msg_tempfile" | mail -s "ITP: $package_name -- $description" submit@bugs.debian.org
- else
- echo "Not submitting. The generated text is available at $msg_tempfile"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement