Skip to content

Commit 977d69c

Browse files
committed
update script
1 parent 761f87e commit 977d69c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

scripts/install.sh

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,16 +99,19 @@ check_version() {
9999
# Download and install the feature-installer binary
100100
download_and_install() {
101101
print_message info "Downloading ${ORANGE}feature-installer ${GREEN}version: ${YELLOW}$specific_version ${GREEN}..."
102-
mkdir -p /tmp/featureinstallertmp && cd /tmp/featureinstallertmp
103-
OLDPWD=$(pwd)
104-
if ! curl -# -L -o "$filename" "$url"; then
102+
print_message info "From: ${YELLOW}$url${GREEN}..."
103+
mkdir -p /tmp/featureinstallertmp
104+
if ! curl -# -L -o "/tmp/featureinstallertmp/$filename" "$url"; then
105105
print_message error "Failed to download $filename from $url"
106-
cd $OLDPWD && rm -rf /tmp/featureinstallertmp
106+
rm -rf /tmp/featureinstallertmp
107107
exit 1
108108
fi
109-
tar -xzf "$filename"
109+
OLDPWD=$(pwd)
110+
cd /tmp/featureinstallertmp
111+
tar -xzf "/tmp/featureinstallertmp/$filename"
110112
mv feature-installer "$INSTALL_DIR"
111-
cd $OLDPWD && rm -rf /tmp/featureinstallertmp
113+
cd "$OLDPWD"
114+
rm -rf /tmp/featureinstallertmp
112115
}
113116

114117
check_version

0 commit comments

Comments
 (0)