|
146 | 146 |
|
147 | 147 | print_success "Selected ${CONFIG_MODE} configuration" |
148 | 148 |
|
149 | | -# Create temporary directory |
150 | | -TEMP_DIR=$(mktemp -d) |
151 | | -print_status "Using temporary directory: $TEMP_DIR" |
152 | | - |
153 | | -# Clone repository with submodules |
154 | | -print_status "Cloning Needle repository with submodules..." |
155 | | -cd "$TEMP_DIR" |
156 | | -git clone --recursive https://github.com/UIC-InDeXLab/Needle.git |
157 | | -cd Needle |
158 | | - |
159 | | -# Make install script executable and run it |
160 | | -print_status "Running Needle installer with ${CONFIG_MODE} configuration..." |
161 | | -chmod +x scripts/install.sh |
162 | | -./scripts/install.sh "$CONFIG_MODE" |
163 | | - |
164 | | -# Move to user's home directory |
| 149 | +# Installation directory |
165 | 150 | INSTALL_DIR="$HOME/.needle" |
| 151 | + |
| 152 | +# Remove old installation if exists |
166 | 153 | if [ -d "$INSTALL_DIR" ]; then |
167 | 154 | print_warning "Directory $INSTALL_DIR already exists. Removing old installation..." |
168 | 155 | rm -rf "$INSTALL_DIR" |
169 | 156 | fi |
170 | 157 |
|
171 | | -print_status "Moving installation to $INSTALL_DIR..." |
172 | | -mv "$TEMP_DIR/Needle" "$INSTALL_DIR" |
173 | | - |
174 | | -# Clean up temporary directory |
175 | | -rm -rf "$TEMP_DIR" |
| 158 | +# Clone repository directly to ~/.needle |
| 159 | +print_status "Cloning Needle repository to $INSTALL_DIR..." |
| 160 | +git clone --recursive https://github.com/UIC-InDeXLab/Needle.git "$INSTALL_DIR" |
176 | 161 |
|
177 | 162 | # Change to installation directory |
178 | 163 | cd "$INSTALL_DIR" |
179 | 164 |
|
| 165 | +# Make install script executable and run it |
| 166 | +print_status "Running Needle installer with ${CONFIG_MODE} configuration..." |
| 167 | +chmod +x scripts/install.sh |
| 168 | +./scripts/install.sh "$CONFIG_MODE" |
| 169 | + |
180 | 170 | print_success "🎉 Installation complete!" |
181 | 171 | echo "" |
182 | 172 | echo "📋 Usage:" |
|
0 commit comments