Skip to content

Conversation

xiaomizhg
Copy link

Script for uninstalling nerdctl_full on Linux

Script for uninstalling nerdctl-full on Linux

Signed-off-by: 今天不回家 <[email protected]>
# Get the installed path
INSTALL_PATH="$1"

# the files and directories to be deleted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should read the file names and the digests from $PREFIX/share/doc/nerdctl-full/SHA256SUMS.
The digests have to be checked (by default, at least) so as to avoid removing files installed by other tools

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This i think cannot be reliably inferred if both hash match. May be it should only be able remove if the install path is specific to nerdctl.

fi

# Get the installed path
INSTALL_PATH="$1"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be automatically guessed from the path of the script

Copy link
Contributor

@apostasie apostasie Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(bash) portable suggestion:
INSTALL_PATH="$(cd "$(dirname "${BASH_SOURCE[0]:-$PWD}")" 2>/dev/null 1>&2 && pwd)"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file name should be like extras/nerdctl-full-uninstall.sh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please squash the commits

@@ -0,0 +1,93 @@
#!/bin/bash
Copy link
Contributor

@apostasie apostasie Jun 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#!/usr/bin/env bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants