add uninstall_nerdctl_full Script#3972
Conversation
Script for uninstalling nerdctl-full on Linux Signed-off-by: 今天不回家 <xiaomizhg@qq.com>
add uninstall_nerdctl_full.sh
| # Get the installed path | ||
| INSTALL_PATH="$1" | ||
|
|
||
| # the files and directories to be deleted |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
This can be automatically guessed from the path of the script
There was a problem hiding this comment.
(bash) portable suggestion:
INSTALL_PATH="$(cd "$(dirname "${BASH_SOURCE[0]:-$PWD}")" 2>/dev/null 1>&2 && pwd)"
There was a problem hiding this comment.
The file name should be like extras/nerdctl-full-uninstall.sh
| @@ -0,0 +1,93 @@ | |||
| #!/bin/bash | |||
Script for uninstalling nerdctl_full on Linux