Chris@700: #!/bin/bash Chris@700: # Chris@700: # Run this from the build root (with sudo, I think) Chris@700: Chris@700: usage() { Chris@700: echo Chris@700: echo "Usage:" Chris@700: echo Chris@700: echo "$0 " Chris@700: echo Chris@700: echo "For example: $0 1.4cc1-1 amd64" Chris@700: echo Chris@700: exit 2 Chris@700: } Chris@700: Chris@700: version="$1" Chris@700: arch="$2" Chris@700: Chris@700: if [ -z "$version" ] || [ -z "$arch" ]; then Chris@700: usage Chris@700: fi Chris@700: Chris@700: set -eu Chris@700: Chris@700: program=EasyMercurial Chris@711: package=easymercurial Chris@700: depdir=deploy/linux Chris@700: Chris@711: targetdir="${package}_${version}_${arch}" Chris@700: Chris@700: echo "Target dir is $targetdir" Chris@700: Chris@700: if [ -d "$targetdir" ]; then Chris@700: echo "Target directory exists, not overwriting" Chris@700: exit Chris@700: fi Chris@700: Chris@700: mkdir "$targetdir" Chris@700: Chris@700: mkdir "$targetdir/DEBIAN" Chris@700: Chris@700: cp "$depdir"/control "$targetdir"/DEBIAN/ Chris@700: Chris@711: mkdir -p "$targetdir"/usr/bin "$targetdir"/usr/share/pixmaps "$targetdir"/usr/share/applications "$targetdir"/usr/share/doc/"$package" Chris@700: Chris@700: cp "$program" "$targetdir"/usr/bin/ Chris@700: Chris@700: cp images/icon/scalable/easyhg-icon.svg "$targetdir"/usr/share/pixmaps/ Chris@700: cp images/icon/128/easyhg-icon.png "$targetdir"/usr/share/pixmaps/ Chris@711: cp deploy/linux/"$program".desktop "$targetdir"/usr/share/applications/"$package".desktop Chris@711: cp README.txt "$targetdir"/usr/share/doc/"$package"/ Chris@711: cat > "$targetdir"/usr/share/doc/"$package"/copyright <