fix(post-boot): remove duplicate ble.sh block and add bashrc log
- Removed duplicate ble.sh installation block - Enhanced logging to show when ble.sh is configured in ~/.bashrc - Captures script output to detect bashrc configuration status
- commit
- 77992c02c063b756a6102cb338cdf856a2301788
- author
- bnema · · 2025-10-31 06:20 UTC
- parent
- 392658c
- signature
- GPG Unverified
2B82207D370127A0The key is unknown
1 file · +8 -11
M install/post-boot/all.sh +8 -11
| @@ -51,21 +51,18 @@ if [ -f /usr/local/share/archup/post-boot/archup-cli.sh ]; then | |||
| 51 | 51 | fi | |
| 52 | 52 | fi | |
| 53 | 53 | ||
| 54 | - | # Install ble.sh (Bash Line Editor) | |
| 55 | - | if [ -f /usr/local/share/archup/post-boot/blesh.sh ]; then | |
| 56 | - | echo "Installing ble.sh (Bash Line Editor)..." >> "$LOG_FILE" | |
| 57 | - | if bash /usr/local/share/archup/post-boot/blesh.sh >> "$LOG_FILE" 2>&1; then | |
| 58 | - | echo "[OK] ble.sh installed successfully" >> "$LOG_FILE" | |
| 59 | - | else | |
| 60 | - | echo "[KO] ble.sh installation failed (non-critical)" >> "$LOG_FILE" | |
| 61 | - | fi | |
| 62 | - | fi | |
| 63 | - | ||
| 64 | 54 | # Install ble.sh (Bash Line Editor) | |
| 65 | 55 | if [ -f /usr/local/share/archup/post-boot/blesh.sh ]; then | |
| 66 | 56 | echo "Installing ble.sh (Bash Line Editor)..." | tee -a "$LOG_FILE" | |
| 67 | - | if bash /usr/local/share/archup/post-boot/blesh.sh >> "$LOG_FILE" 2>&1; then | |
| 57 | + | BLESH_OUTPUT=$(bash /usr/local/share/archup/post-boot/blesh.sh 2>&1 | tee -a "$LOG_FILE") | |
| 58 | + | if [ $? -eq 0 ]; then | |
| 68 | 59 | echo "✓ ble.sh installed successfully" | tee -a "$LOG_FILE" | |
| 60 | + | # Check if it was added to bashrc | |
| 61 | + | if echo "$BLESH_OUTPUT" | grep -q "ble.sh added to .bashrc"; then | |
| 62 | + | echo " → ble.sh configured in ~/.bashrc" | tee -a "$LOG_FILE" | |
| 63 | + | elif echo "$BLESH_OUTPUT" | grep -q "ble.sh already configured"; then | |
| 64 | + | echo " → ble.sh already present in ~/.bashrc" | tee -a "$LOG_FILE" | |
| 65 | + | fi | |
| 69 | 66 | else | |
| 70 | 67 | echo "✗ ble.sh installation failed (non-critical)" | tee -a "$LOG_FILE" | |
| 71 | 68 | fi | |
| @@ -51,21 +51,18 @@ if [ -f /usr/local/share/archup/post-boot/archup-cli.sh ]; then | |||||
| 51 | fi | 51 | fi | ||
| 52 | fi | 52 | fi | ||
| 53 | 53 | ||||
| 54 | - | # Install ble.sh (Bash Line Editor) | |||
| 55 | - | if [ -f /usr/local/share/archup/post-boot/blesh.sh ]; then | |||
| 56 | - | echo "Installing ble.sh (Bash Line Editor)..." >> "$LOG_FILE" | |||
| 57 | - | if bash /usr/local/share/archup/post-boot/blesh.sh >> "$LOG_FILE" 2>&1; then | |||
| 58 | - | echo "[OK] ble.sh installed successfully" >> "$LOG_FILE" | |||
| 59 | - | else | |||
| 60 | - | echo "[KO] ble.sh installation failed (non-critical)" >> "$LOG_FILE" | |||
| 61 | - | fi | |||
| 62 | - | fi | |||
| 63 | - | ||||
| 64 | # Install ble.sh (Bash Line Editor) | 54 | # Install ble.sh (Bash Line Editor) | ||
| 65 | if [ -f /usr/local/share/archup/post-boot/blesh.sh ]; then | 55 | if [ -f /usr/local/share/archup/post-boot/blesh.sh ]; then | ||
| 66 | echo "Installing ble.sh (Bash Line Editor)..." | tee -a "$LOG_FILE" | 56 | echo "Installing ble.sh (Bash Line Editor)..." | tee -a "$LOG_FILE" | ||
| 67 | - | if bash /usr/local/share/archup/post-boot/blesh.sh >> "$LOG_FILE" 2>&1; then | 57 | + | BLESH_OUTPUT=$(bash /usr/local/share/archup/post-boot/blesh.sh 2>&1 | tee -a "$LOG_FILE") |
| 58 | + | if [ $? -eq 0 ]; then | |||
| 68 | echo "✓ ble.sh installed successfully" | tee -a "$LOG_FILE" | 59 | echo "✓ ble.sh installed successfully" | tee -a "$LOG_FILE" | ||
| 60 | + | # Check if it was added to bashrc | |||
| 61 | + | if echo "$BLESH_OUTPUT" | grep -q "ble.sh added to .bashrc"; then | |||
| 62 | + | echo " → ble.sh configured in ~/.bashrc" | tee -a "$LOG_FILE" | |||
| 63 | + | elif echo "$BLESH_OUTPUT" | grep -q "ble.sh already configured"; then | |||
| 64 | + | echo " → ble.sh already present in ~/.bashrc" | tee -a "$LOG_FILE" | |||
| 65 | + | fi | |||
| 69 | else | 66 | else | ||
| 70 | echo "✗ ble.sh installation failed (non-critical)" | tee -a "$LOG_FILE" | 67 | echo "✗ ble.sh installation failed (non-critical)" | tee -a "$LOG_FILE" | ||
| 71 | fi | 68 | fi | ||