File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed
applications/wg-easy/taskfiles Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,10 @@ tasks:
3131
3232 echo "Detected OS: $OS, Architecture: $ARCH"
3333
34+ # Create a temporary directory for extraction
35+ TEMP_DIR=$(mktemp -d)
36+ cd "$TEMP_DIR"
37+
3438 # Download and install based on OS
3539 if [ "$OS" = "linux" ]; then
3640 echo "Downloading Replicated CLI for Linux..."
4145
4246 tar xzf replicated.tar.gz
4347 sudo mv replicated /usr/local/bin/replicated
44- rm -f replicated.tar.gz
4548
4649 elif [ "$OS" = "darwin" ]; then
4750 echo "Downloading Replicated CLI for macOS..."
@@ -52,14 +55,19 @@ tasks:
5255
5356 tar xzf replicated.tar.gz
5457 sudo mv replicated /usr/local/bin/replicated
55- rm -f replicated.tar.gz
5658
5759 else
5860 echo "Unsupported operating system: $OS"
5961 echo "Please install manually from: https://docs.replicated.com/reference/replicated-cli-installing"
62+ cd - >/dev/null
63+ rm -rf "$TEMP_DIR"
6064 exit 1
6165 fi
6266
67+ # Clean up temporary directory
68+ cd - >/dev/null
69+ rm -rf "$TEMP_DIR"
70+
6371 # Verify installation
6472 if command -v replicated >/dev/null 2>&1; then
6573 echo "Replicated CLI installed successfully!"
You can’t perform that action at this time.
0 commit comments