File tree Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Expand file tree Collapse file tree 2 files changed +59
-0
lines changed Original file line number Diff line number Diff line change 194
194
if [ ! -z " ${service_notification_version} " ] ; then
195
195
sed -i " s/fledge-service-notification/fledge-service-notification (${service_notification_version} )/" ${deb_path} /control
196
196
fi
197
+ if [ -d ${GIT_ROOT} /python ]; then
198
+ sed -i " s|__INSTALL_DIR__|${installs} |g" ${deb_path} /postrm
199
+ else
200
+ sed -i ' /^remove_install_dir () {/,/}/d' ${deb_path} /postrm
201
+ sed -i ' s/remove_install_dir$//g' ${deb_path} /postrm
202
+ fi
197
203
if [ -f " ${GIT_ROOT} /additional_lib.version" ]; then
198
204
while read line ; do
199
205
if [ ! -z " $line " ]; then
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # #--------------------------------------------------------------------
4
+ # # Copyright (c) 2023 Dianomic Systems Inc.
5
+ # #
6
+ # # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # # you may not use this file except in compliance with the License.
8
+ # # You may obtain a copy of the License at
9
+ # #
10
+ # # http://www.apache.org/licenses/LICENSE-2.0
11
+ # #
12
+ # # Unless required by applicable law or agreed to in writing, software
13
+ # # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # # See the License for the specific language governing permissions and
16
+ # # limitations under the License.
17
+ # #--------------------------------------------------------------------
18
+
19
+ # #--------------------------------------------------------------------
20
+ # #
21
+ # # @postinst DEBIAN/postrm
22
+ # # This script is used to modifies links or other files associated with fledge, and/or removes files created by the package.
23
+ # #
24
+ # # Author: Ashish Jabble
25
+ # #
26
+ # #--------------------------------------------------------------------
27
+
28
+ set -e
29
+
30
+ remove_install_dir () {
31
+ if [ -d /usr/local/fledge/__INSTALL_DIR__ ]; then
32
+ rm -rf /usr/local/fledge/__INSTALL_DIR__
33
+ fi
34
+ }
35
+
36
+ case " $1 " in
37
+ remove|purge)
38
+ remove_install_dir
39
+ ;;
40
+ disappear)
41
+ ;;
42
+ upgrade)
43
+ ;;
44
+ failed-upgrade)
45
+ ;;
46
+ abort-install)
47
+ ;;
48
+ abort-upgrade)
49
+ ;;
50
+ * ) echo " $0 : didn't understand being called with \` $1 '" 1>&2
51
+ exit 0;;
52
+ esac
53
+ exit 0
You can’t perform that action at this time.
0 commit comments