Merge "Move dlux Sonar scan to Sonarcloud"
[releng/builder.git] / jjb / packaging / uninstall-deb.sh
1 #!/bin/bash
2
3 # Options:
4 #   -x: Echo commands
5 #   -e: Fail on errors
6 #   -o pipefail: Fail on errors in scripts this calls, give stacktrace
7 set -ex -o pipefail
8
9 # Uninstall ODL
10 sudo dpkg --purge opendaylight
11
12 # Verify ODL not installed
13 if dpkg -s opendaylight; then
14     # Fail if exit code 0, ie ODL is still installed
15     echo "OpenDaylight unexpectedly still installed"
16     exit 1
17 else
18     echo "OpenDaylight not installed, as expected"
19 fi