diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 18:24:48 +0000 |
commit | cca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch) | |
tree | 146f39ded1c938019e1ed42d30923c2ac9e86789 /packaging/macos/uninstall_toolset.sh | |
parent | Initial commit. (diff) | |
download | inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip |
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | packaging/macos/uninstall_toolset.sh | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/packaging/macos/uninstall_toolset.sh b/packaging/macos/uninstall_toolset.sh new file mode 100755 index 0000000..82b154f --- /dev/null +++ b/packaging/macos/uninstall_toolset.sh @@ -0,0 +1,58 @@ +#!/usr/bin/env bash +# +# SPDX-FileCopyrightText: 2021 René de Hesselle <dehesselle@web.de> +# +# SPDX-License-Identifier: GPL-2.0-or-later + +### description ################################################################ + +# Uninstall a previously installed toolset: unmount the disk images. + +### shellcheck ################################################################# + +# Nothing here. + +### dependencies ############################################################### + +source "$(dirname "${BASH_SOURCE[0]}")"/jhb/etc/jhb.conf.sh \ + "$(dirname "${BASH_SOURCE[0]}")"/src/jhb-custom.conf.sh +source "$(dirname "${BASH_SOURCE[0]}")"/src/ink.sh + +bash_d_include echo +bash_d_include error + +### variables ################################################################## + +SELF_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1; pwd) + +### functions ################################################################## + +function save_overlay +{ + local overlay + overlay=$(diskutil list | grep "$RELEASE_OVERLAY" | grep "0:" | + awk '{ print $5 }') + umount /dev/"$overlay" + + mount -o nobrowse,ro -t hfs /dev/"$overlay" "$TMP_DIR" + tar -C "$TMP_DIR" --exclude "Inkscape.???" --exclude ".fseventsd" -cp . | + XZ_OPT=-T0 xz > "$ARTIFACT_DIR"/toolset_overlay.tar.xz + + diskutil eject "$overlay" +} + +### main ####################################################################### + +error_trace_enable + +case "$1" in + save_overlay) # save files from build stage (to be used later in test stage) + save_overlay + ;; + save_testfiles) # save files from test stage (test evidence) + tar -C "$INK_BLD_DIR" -cp testfiles | + XZ_OPT=-T0 xz > "$ARTIFACT_DIR"/testfiles.tar.xz + ;; +esac + +"$SELF_DIR"/jhb/usr/bin/archive uninstall_dmg
\ No newline at end of file |