Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions crates/gitbutler-tauri/deb-postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh
# Postinstall script for the deb package.

# Print metrics notice on fresh install
if [ "$1" = "configure" ] && [ -z "$2" ]; then
echo ""
echo "GitButler uses metrics to help us improve our product."
echo "You can configure metrics collection either in the GUI or via 'but config metrics'."
echo "Privacy policy: https://gitbutler.com/privacy"
echo ""
fi
13 changes: 13 additions & 0 deletions crates/gitbutler-tauri/rpm-postinstall.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/bin/sh
# Postinstall script for the rpm package.

set -eu

# Create a 'but' symlink so the CLI is available as /usr/bin/but.
#
# Ideally this symlink would be a proper tracked file in the RPM (like VS Code
Expand Down Expand Up @@ -37,3 +41,12 @@ else
echo "Error: $SYMLINK already exists and is not a symlink" >&2
exit 1
fi

# Print metrics notice on fresh install
if [ "${1:-}" = "1" ]; then
echo ""
echo "GitButler uses metrics to help us improve our product."
echo "You can configure metrics collection either in the GUI or via 'but config metrics'."
echo "Privacy policy: https://gitbutler.com/privacy"
echo ""
fi
2 changes: 2 additions & 0 deletions crates/gitbutler-tauri/rpm-preremove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# We only remove the symlink on a full uninstall; during an upgrade the
# postinstall script of the new package will recreate/update it.

set -eu

# Skip removal during upgrades
if [ "${1:-0}" -ge 1 ]; then
exit 0
Expand Down
1 change: 1 addition & 0 deletions crates/gitbutler-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
},
"deb": {
"depends": ["libwebkit2gtk-4.1-0", "libgtk-3-0"],
"postInstallScript": "deb-postinstall.sh",
"files": {
"/usr/share/metainfo/com.gitbutler.gitbutler.metainfo.xml": "com.gitbutler.gitbutler.metainfo.xml"
}
Expand Down
Loading