weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 1 insertion, 25 deletions
menu.sh
| @@ -144,9 +144,7 @@ install_python() { | |||
| 144 | 144 | SRC_URL="https://www.python.org/ftp/python/${LATEST_PY}/Python-${LATEST_PY}.tgz" | |
| 145 | 145 | curl -fsSL -o /tmp/Python.tgz "$SRC_URL" | |
| 146 | 146 | cd /tmp && tar -xzf Python.tgz && cd "Python-${LATEST_PY}" | |
| 147 | - | ||
| 148 | - | # Added --with-ensurepip=install to guarantee pip is compiled in | |
| 149 | - | ./configure --enable-optimizations --with-ensurepip=install | |
| 147 | + | ./configure --enable-optimizations | |
| 150 | 148 | sudo make altinstall | |
| 151 | 149 | ||
| 152 | 150 | PY_MINOR=$(echo "$LATEST_PY" | cut -d. -f1,2) | |
| @@ -156,28 +154,6 @@ install_python() { | |||
| 156 | 154 | ||
| 157 | 155 | cd ~ && sudo rm -rf /tmp/Python* | |
| 158 | 156 | fi | |
| 159 | - | ||
| 160 | - | # ========================================== | |
| 161 | - | # NEW: Explicit Pip Bootstrap & Upgrade Step | |
| 162 | - | # ========================================== | |
| 163 | - | log "Ensuring pip3 is installed and up to date..." | |
| 164 | - | ||
| 165 | - | # Reload path temporarily just in case it was installed to a fresh directory | |
| 166 | - | export PATH="/usr/local/bin:$PATH" | |
| 167 | - | ||
| 168 | - | if require_cmd python3; then | |
| 169 | - | # 1. Bootstrap pip (in case the package or make process missed it) | |
| 170 | - | sudo python3 -m ensurepip --upgrade --default-pip | |
| 171 | - | ||
| 172 | - | # 2. Upgrade pip to the absolute latest version | |
| 173 | - | sudo python3 -m pip install --upgrade pip | |
| 174 | - | ||
| 175 | - | log "Python and Pip3 successfully installed/upgraded." | |
| 176 | - | python3 --version | |
| 177 | - | pip3 --version | |
| 178 | - | else | |
| 179 | - | err "Python3 installation failed or isn't in PATH. Cannot configure pip3." | |
| 180 | - | fi | |
| 181 | 157 | } | |
| 182 | 158 | ||
| 183 | 159 | install_go() { | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 25 insertions, 1 deletion
menu.sh
| @@ -144,7 +144,9 @@ install_python() { | |||
| 144 | 144 | SRC_URL="https://www.python.org/ftp/python/${LATEST_PY}/Python-${LATEST_PY}.tgz" | |
| 145 | 145 | curl -fsSL -o /tmp/Python.tgz "$SRC_URL" | |
| 146 | 146 | cd /tmp && tar -xzf Python.tgz && cd "Python-${LATEST_PY}" | |
| 147 | - | ./configure --enable-optimizations | |
| 147 | + | ||
| 148 | + | # Added --with-ensurepip=install to guarantee pip is compiled in | |
| 149 | + | ./configure --enable-optimizations --with-ensurepip=install | |
| 148 | 150 | sudo make altinstall | |
| 149 | 151 | ||
| 150 | 152 | PY_MINOR=$(echo "$LATEST_PY" | cut -d. -f1,2) | |
| @@ -154,6 +156,28 @@ install_python() { | |||
| 154 | 156 | ||
| 155 | 157 | cd ~ && sudo rm -rf /tmp/Python* | |
| 156 | 158 | fi | |
| 159 | + | ||
| 160 | + | # ========================================== | |
| 161 | + | # NEW: Explicit Pip Bootstrap & Upgrade Step | |
| 162 | + | # ========================================== | |
| 163 | + | log "Ensuring pip3 is installed and up to date..." | |
| 164 | + | ||
| 165 | + | # Reload path temporarily just in case it was installed to a fresh directory | |
| 166 | + | export PATH="/usr/local/bin:$PATH" | |
| 167 | + | ||
| 168 | + | if require_cmd python3; then | |
| 169 | + | # 1. Bootstrap pip (in case the package or make process missed it) | |
| 170 | + | sudo python3 -m ensurepip --upgrade --default-pip | |
| 171 | + | ||
| 172 | + | # 2. Upgrade pip to the absolute latest version | |
| 173 | + | sudo python3 -m pip install --upgrade pip | |
| 174 | + | ||
| 175 | + | log "Python and Pip3 successfully installed/upgraded." | |
| 176 | + | python3 --version | |
| 177 | + | pip3 --version | |
| 178 | + | else | |
| 179 | + | err "Python3 installation failed or isn't in PATH. Cannot configure pip3." | |
| 180 | + | fi | |
| 157 | 181 | } | |
| 158 | 182 | ||
| 159 | 183 | install_go() { | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 36 insertions, 23 deletions
menu.sh
| @@ -188,37 +188,52 @@ install_dotnet() { | |||
| 188 | 188 | # ============================= | |
| 189 | 189 | ||
| 190 | 190 | install_docker() { | |
| 191 | - | if require_cmd docker; then log "Docker exists"; return; fi | |
| 192 | - | log "Installing Docker from official source..." | |
| 191 | + | if require_cmd docker; then log "Docker exists"; else | |
| 192 | + | log "Installing Docker from official source..." | |
| 193 | + | ||
| 194 | + | if [[ "$OS" == "macOS" ]]; then | |
| 195 | + | [[ "$SYS_ARCH" == "arm64" ]] && DOCKER_MAC_ARCH="arm64" || DOCKER_MAC_ARCH="amd64" | |
| 196 | + | DMG_URL="https://desktop.docker.com/mac/main/${DOCKER_MAC_ARCH}/Docker.dmg" | |
| 197 | + | curl -fsSL -o /tmp/Docker.dmg "$DMG_URL" | |
| 198 | + | hdiutil attach /tmp/Docker.dmg -nobrowse -mountpoint /Volumes/Docker | |
| 199 | + | sudo cp -a /Volumes/Docker/Docker.app /Applications/ | |
| 200 | + | hdiutil detach /Volumes/Docker | |
| 201 | + | rm /tmp/Docker.dmg | |
| 202 | + | ||
| 203 | + | log "Starting Docker Desktop..." | |
| 204 | + | open /Applications/Docker.app | |
| 205 | + | log "Please complete the setup in the Docker Desktop UI." | |
| 206 | + | else | |
| 207 | + | # Linux install | |
| 208 | + | curl -fsSL https://get.docker.com | sudo sh | |
| 209 | + | fi | |
| 210 | + | fi | |
| 193 | 211 | ||
| 194 | - | if [[ "$OS" == "macOS" ]]; then | |
| 195 | - | [[ "$SYS_ARCH" == "arm64" ]] && DOCKER_MAC_ARCH="arm64" || DOCKER_MAC_ARCH="amd64" | |
| 196 | - | DMG_URL="https://desktop.docker.com/mac/main/${DOCKER_MAC_ARCH}/Docker.dmg" | |
| 197 | - | curl -fsSL -o /tmp/Docker.dmg "$DMG_URL" | |
| 198 | - | hdiutil attach /tmp/Docker.dmg -nobrowse -mountpoint /Volumes/Docker | |
| 199 | - | sudo cp -a /Volumes/Docker/Docker.app /Applications/ | |
| 200 | - | hdiutil detach /Volumes/Docker | |
| 201 | - | rm /tmp/Docker.dmg | |
| 212 | + | # Post-install logic for Linux (Ubuntu/WSL) | |
| 213 | + | if [[ "$OS" != "macOS" ]]; then | |
| 214 | + | log "Applying Linux post-install actions..." | |
| 202 | 215 | ||
| 203 | - | # macOS Post-install: Launch Docker to start the daemon process | |
| 204 | - | log "Starting Docker Desktop..." | |
| 205 | - | open /Applications/Docker.app | |
| 206 | - | log "Please complete the setup in the Docker Desktop UI." | |
| 207 | - | else | |
| 208 | - | # Linux install | |
| 209 | - | curl -fsSL https://get.docker.com | sudo sh | |
| 210 | - | ||
| 211 | - | # Linux Post-install: Add user to group | |
| 216 | + | # 1. Create docker group and add user | |
| 217 | + | sudo groupadd -f docker | |
| 212 | 218 | sudo usermod -aG docker "$USER" | |
| 213 | 219 | ||
| 214 | - | # Linux Post-install: Enable and start Docker services on boot | |
| 220 | + | # 2. Enable and start Docker services | |
| 215 | 221 | if command -v systemctl >/dev/null 2>&1; then | |
| 216 | 222 | sudo systemctl enable --now docker.service | |
| 217 | 223 | sudo systemctl enable --now containerd.service | |
| 224 | + | elif [[ "$OS" == "WSL" ]]; then | |
| 225 | + | sudo service docker start | |
| 226 | + | fi | |
| 227 | + | ||
| 228 | + | # 3. Immediate Socket Fix | |
| 229 | + | if [[ -S /var/run/docker.sock ]]; then | |
| 230 | + | log "Fixing ownership of /var/run/docker.sock..." | |
| 231 | + | sudo chown root:docker /var/run/docker.sock | |
| 232 | + | sudo chmod 660 /var/run/docker.sock | |
| 218 | 233 | fi | |
| 219 | 234 | ||
| 220 | 235 | log "Added $USER to the docker group." | |
| 221 | - | log "CRITICAL: To apply group changes immediately without logging out, run: newgrp docker" | |
| 236 | + | log "CRITICAL: To apply group changes immediately, run: newgrp docker" | |
| 222 | 237 | fi | |
| 223 | 238 | } | |
| 224 | 239 | ||
| @@ -246,7 +261,6 @@ install_gcloud() { | |||
| 246 | 261 | log "Installing Google Cloud CLI..." | |
| 247 | 262 | curl -fsSL https://sdk.cloud.google.com | bash -s -- --disable-prompts | |
| 248 | 263 | ||
| 249 | - | # Use the dot operator which is more POSIX compliant | |
| 250 | 264 | add_to_path_config "GCLOUD" '[ -f "$HOME/google-cloud-sdk/path.bash.inc" ] && . "$HOME/google-cloud-sdk/path.bash.inc"' | |
| 251 | 265 | } | |
| 252 | 266 | ||
| @@ -254,7 +268,6 @@ install_firebase() { | |||
| 254 | 268 | if require_cmd firebase; then warn "Firebase CLI exists"; return; fi | |
| 255 | 269 | log "Installing Firebase CLI via NPM to ensure ARM64 compatibility..." | |
| 256 | 270 | ||
| 257 | - | # Check if npm exists, if not, try to load nvm or warn user | |
| 258 | 271 | if ! require_cmd npm; then | |
| 259 | 272 | err "NPM not found. Please install NVM (Option 3) first." | |
| 260 | 273 | return 1 | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 5 insertions, 25 deletions
menu.sh
| @@ -280,35 +280,15 @@ install_gh() { | |||
| 280 | 280 | } | |
| 281 | 281 | ||
| 282 | 282 | install_infisical() { | |
| 283 | - | if require_cmd infisical; then warn "Infisical exists"; return; fi | |
| 284 | - | log "Fetching latest Infisical binary from GitHub Releases..." | |
| 285 | - | ||
| 286 | - | # Fetch latest version and handle potential API rate limits | |
| 287 | - | LATEST_INF=$(curl -s https://api.github.com/repos/Infisical/infisical-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | |
| 288 | - | ||
| 289 | - | if [[ -z "$LATEST_INF" ]]; then | |
| 290 | - | err "Failed to fetch latest Infisical version. You might have hit a GitHub API rate limit." | |
| 291 | - | return 1 | |
| 292 | - | fi | |
| 293 | - | ||
| 294 | - | TAR_FILE="infisical_${LATEST_INF}_${OS_LOWER}_${SYS_ARCH}.tar.gz" | |
| 295 | - | DOWNLOAD_URL="https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}" | |
| 296 | - | ||
| 297 | - | log "Downloading Infisical v${LATEST_INF}..." | |
| 283 | + | if require_cmd infisical; then warn "Infisical CLI exists"; return; fi | |
| 284 | + | log "Installing Infisical CLI via NPM..." | |
| 298 | 285 | ||
| 299 | - | # The -f flag in curl makes it fail silently on server errors, but we check the return code | |
| 300 | - | if ! curl -fsSL -o /tmp/infisical.tar.gz "$DOWNLOAD_URL"; then | |
| 301 | - | err "Download failed! URL might be incorrect: $DOWNLOAD_URL" | |
| 302 | - | rm -f /tmp/infisical.tar.gz | |
| 286 | + | if ! require_cmd npm; then | |
| 287 | + | err "NPM not found. Please install NVM (Option 3) first." | |
| 303 | 288 | return 1 | |
| 304 | 289 | fi | |
| 305 | - | ||
| 306 | - | # Extract and cleanup | |
| 307 | - | tar -xzf /tmp/infisical.tar.gz -C /tmp | |
| 308 | - | sudo mv /tmp/infisical /usr/local/bin/ | |
| 309 | - | rm -f /tmp/infisical.tar.gz | |
| 310 | 290 | ||
| 311 | - | log "Infisical successfully installed." | |
| 291 | + | npm install -g @infisical/cli | |
| 312 | 292 | } | |
| 313 | 293 | ||
| 314 | 294 | # ============================= | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 22 insertions, 2 deletions
menu.sh
| @@ -282,13 +282,33 @@ install_gh() { | |||
| 282 | 282 | install_infisical() { | |
| 283 | 283 | if require_cmd infisical; then warn "Infisical exists"; return; fi | |
| 284 | 284 | log "Fetching latest Infisical binary from GitHub Releases..." | |
| 285 | + | ||
| 286 | + | # Fetch latest version and handle potential API rate limits | |
| 285 | 287 | LATEST_INF=$(curl -s https://api.github.com/repos/Infisical/infisical-cli/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') | |
| 288 | + | ||
| 289 | + | if [[ -z "$LATEST_INF" ]]; then | |
| 290 | + | err "Failed to fetch latest Infisical version. You might have hit a GitHub API rate limit." | |
| 291 | + | return 1 | |
| 292 | + | fi | |
| 293 | + | ||
| 286 | 294 | TAR_FILE="infisical_${LATEST_INF}_${OS_LOWER}_${SYS_ARCH}.tar.gz" | |
| 295 | + | DOWNLOAD_URL="https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}" | |
| 287 | 296 | ||
| 288 | - | curl -fsSL -o /tmp/infisical.tar.gz "https://github.com/Infisical/infisical-cli/releases/download/v${LATEST_INF}/${TAR_FILE}" | |
| 297 | + | log "Downloading Infisical v${LATEST_INF}..." | |
| 298 | + | ||
| 299 | + | # The -f flag in curl makes it fail silently on server errors, but we check the return code | |
| 300 | + | if ! curl -fsSL -o /tmp/infisical.tar.gz "$DOWNLOAD_URL"; then | |
| 301 | + | err "Download failed! URL might be incorrect: $DOWNLOAD_URL" | |
| 302 | + | rm -f /tmp/infisical.tar.gz | |
| 303 | + | return 1 | |
| 304 | + | fi | |
| 305 | + | ||
| 306 | + | # Extract and cleanup | |
| 289 | 307 | tar -xzf /tmp/infisical.tar.gz -C /tmp | |
| 290 | 308 | sudo mv /tmp/infisical /usr/local/bin/ | |
| 291 | - | rm /tmp/infisical.tar.gz | |
| 309 | + | rm -f /tmp/infisical.tar.gz | |
| 310 | + | ||
| 311 | + | log "Infisical successfully installed." | |
| 292 | 312 | } | |
| 293 | 313 | ||
| 294 | 314 | # ============================= | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 13 insertions, 4 deletions
menu.sh
| @@ -245,13 +245,22 @@ install_gcloud() { | |||
| 245 | 245 | if require_cmd gcloud; then warn "Google Cloud CLI exists"; return; fi | |
| 246 | 246 | log "Installing Google Cloud CLI..." | |
| 247 | 247 | curl -fsSL https://sdk.cloud.google.com | bash -s -- --disable-prompts | |
| 248 | - | add_to_path_config "GCLOUD" 'source "$HOME/google-cloud-sdk/path.bash.inc"' | |
| 248 | + | ||
| 249 | + | # Use the dot operator which is more POSIX compliant | |
| 250 | + | add_to_path_config "GCLOUD" '[ -f "$HOME/google-cloud-sdk/path.bash.inc" ] && . "$HOME/google-cloud-sdk/path.bash.inc"' | |
| 249 | 251 | } | |
| 250 | 252 | ||
| 251 | 253 | install_firebase() { | |
| 252 | 254 | if require_cmd firebase; then warn "Firebase CLI exists"; return; fi | |
| 253 | - | log "Installing Standalone Firebase CLI..." | |
| 254 | - | curl -sL https://firebase.tools | bash | |
| 255 | + | log "Installing Firebase CLI via NPM to ensure ARM64 compatibility..." | |
| 256 | + | ||
| 257 | + | # Check if npm exists, if not, try to load nvm or warn user | |
| 258 | + | if ! require_cmd npm; then | |
| 259 | + | err "NPM not found. Please install NVM (Option 3) first." | |
| 260 | + | return 1 | |
| 261 | + | fi | |
| 262 | + | ||
| 263 | + | npm install -g firebase-tools | |
| 255 | 264 | } | |
| 256 | 265 | ||
| 257 | 266 | # ============================= | |
| @@ -315,7 +324,7 @@ show_menu() { | |||
| 315 | 324 | echo " 8) Docker (Official DMG/sh)" | |
| 316 | 325 | echo " 9) AWS CLI (Official Bin)" | |
| 317 | 326 | echo " 10) Google Cloud CLI (gcloud)" | |
| 318 | - | echo " 11) Firebase CLI (Standalone)" | |
| 327 | + | echo " 11) Firebase CLI (NPM/ARM64 Safe)" | |
| 319 | 328 | echo -e "${YELLOW}--- Dev Tools & Security ---${NC}" | |
| 320 | 329 | echo " 12) GitHub CLI (Official Bin)" | |
| 321 | 330 | echo " 13) Infisical (Official Bin)" | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 17 insertions, 1 deletion
menu.sh
| @@ -199,10 +199,26 @@ install_docker() { | |||
| 199 | 199 | sudo cp -a /Volumes/Docker/Docker.app /Applications/ | |
| 200 | 200 | hdiutil detach /Volumes/Docker | |
| 201 | 201 | rm /tmp/Docker.dmg | |
| 202 | + | ||
| 203 | + | # macOS Post-install: Launch Docker to start the daemon process | |
| 204 | + | log "Starting Docker Desktop..." | |
| 205 | + | open /Applications/Docker.app | |
| 206 | + | log "Please complete the setup in the Docker Desktop UI." | |
| 202 | 207 | else | |
| 208 | + | # Linux install | |
| 203 | 209 | curl -fsSL https://get.docker.com | sudo sh | |
| 210 | + | ||
| 211 | + | # Linux Post-install: Add user to group | |
| 204 | 212 | sudo usermod -aG docker "$USER" | |
| 205 | - | log "Added $USER to docker group. You may need to logout/login." | |
| 213 | + | ||
| 214 | + | # Linux Post-install: Enable and start Docker services on boot | |
| 215 | + | if command -v systemctl >/dev/null 2>&1; then | |
| 216 | + | sudo systemctl enable --now docker.service | |
| 217 | + | sudo systemctl enable --now containerd.service | |
| 218 | + | fi | |
| 219 | + | ||
| 220 | + | log "Added $USER to the docker group." | |
| 221 | + | log "CRITICAL: To apply group changes immediately without logging out, run: newgrp docker" | |
| 206 | 222 | fi | |
| 207 | 223 | } | |
| 208 | 224 | ||
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
Değişiklik yok
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 2 insertions, 2 deletions
menu.sh
| @@ -274,9 +274,9 @@ install_claude() { log "Installing Claude Code..."; curl -fsSL https://claude.ai | |||
| 274 | 274 | install_opencode() { log "Installing OpenCode..."; curl -fsSL https://opencode.ai/install | bash; } | |
| 275 | 275 | ||
| 276 | 276 | install_codex() { | |
| 277 | - | log "Installing OpenAI Codex CLI..." | |
| 277 | + | log "Installing @openai/codex..." | |
| 278 | 278 | if ! require_cmd npm; then err "Node.js/NPM is required. Install NVM (3) first."; return 1; fi | |
| 279 | - | npm install -g openai | |
| 279 | + | npm i -g @openai/codex | |
| 280 | 280 | } | |
| 281 | 281 | ||
| 282 | 282 | # ============================= | |
weehong bu gisti düzenledi 1 month ago. Düzenlemeye git
1 file changed, 14 insertions, 7 deletions
menu.sh
| @@ -288,17 +288,24 @@ show_menu() { | |||
| 288 | 288 | echo -e "${GREEN} DEVELOPER ENVIRONMENT INSTALLER (Strict) ${NC}" | |
| 289 | 289 | echo -e "${BLUE}==================================================${NC}" | |
| 290 | 290 | echo -e "${YELLOW}--- Core Runtimes & Managers ---${NC}" | |
| 291 | - | echo " 1) Build Tools (GCC/Make) 2) Homebrew (Optional)" | |
| 292 | - | echo " 3) NVM (Node.js) 4) Python 3 (Official API)" | |
| 293 | - | echo " 5) Go (Official -> /usr/local) 6) SDKMAN (Java/Kotlin)" | |
| 291 | + | echo " 1) Build Tools (GCC/Make)" | |
| 292 | + | echo " 2) Homebrew (Optional)" | |
| 293 | + | echo " 3) NVM (Node.js)" | |
| 294 | + | echo " 4) Python 3 (Official API)" | |
| 295 | + | echo " 5) Go (Official -> /usr/local)" | |
| 296 | + | echo " 6) SDKMAN (Java/Kotlin)" | |
| 294 | 297 | echo " 7) .NET (Official Script)" | |
| 295 | 298 | echo -e "${YELLOW}--- Cloud & Infrastructure ---${NC}" | |
| 296 | - | echo " 8) Docker (Official DMG/sh) 9) AWS CLI (Official Bin)" | |
| 297 | - | echo " 10) Google Cloud CLI (gcloud) 11) Firebase CLI (Standalone)" | |
| 299 | + | echo " 8) Docker (Official DMG/sh)" | |
| 300 | + | echo " 9) AWS CLI (Official Bin)" | |
| 301 | + | echo " 10) Google Cloud CLI (gcloud)" | |
| 302 | + | echo " 11) Firebase CLI (Standalone)" | |
| 298 | 303 | echo -e "${YELLOW}--- Dev Tools & Security ---${NC}" | |
| 299 | - | echo " 12) GitHub CLI (Official Bin) 13) Infisical (Official Bin)" | |
| 304 | + | echo " 12) GitHub CLI (Official Bin)" | |
| 305 | + | echo " 13) Infisical (Official Bin)" | |
| 300 | 306 | echo -e "${YELLOW}--- AI & Agentic Tools ---${NC}" | |
| 301 | - | echo " 14) Claude Code CLI 15) OpenCode (opencode.ai)" | |
| 307 | + | echo " 14) Claude Code CLI" | |
| 308 | + | echo " 15) OpenCode (opencode.ai)" | |
| 302 | 309 | echo " 16) OpenAI Codex CLI" | |
| 303 | 310 | echo -e "${BLUE}==================================================${NC}" | |
| 304 | 311 | echo " 99) Quit" | |