Skip to content

Commit dab250d

Browse files
committed
fix: show pull progress and use 5-step install
1 parent 2e08a8f commit dab250d

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

install.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ case "$ARCH" in
4545
esac
4646

4747
ARTIFACT="hackcode-${PLATFORM}-${ARCH_NAME}"
48-
echo -e "${GREEN}[1/4]${NC} Detected: ${BOLD}${OS} ${ARCH}${NC} -> ${ARTIFACT}"
48+
echo -e "${GREEN}[1/5]${NC} Detected: ${BOLD}${OS} ${ARCH}${NC} -> ${ARTIFACT}"
4949

5050
# ─── Try downloading pre-built binary ─────────────────────
51-
echo -e "${GREEN}[2/4]${NC} Getting HackCode..."
51+
echo -e "${GREEN}[2/5]${NC} Getting HackCode..."
5252

5353
INSTALLED=false
5454

@@ -135,7 +135,7 @@ if [ "$INSTALLED" = false ]; then
135135
fi
136136

137137
# ─── Add to PATH ──────────────────────────────────────────
138-
echo -e "${GREEN}[3/4]${NC} Adding hackcode to PATH..."
138+
echo -e "${GREEN}[3/5]${NC} Adding hackcode to PATH..."
139139

140140
SHELL_NAME=$(basename "$SHELL")
141141
case "$SHELL_NAME" in
@@ -162,7 +162,7 @@ fi
162162
export PATH="$INSTALL_DIR:$PATH"
163163

164164
# ─── Ollama + Model ───────────────────────────────────────
165-
echo -e "${GREEN}[4/4]${NC} Setting up Ollama + AI model..."
165+
echo -e "${GREEN}[4/5]${NC} Pulling AI model..."
166166

167167
OLLAMA_BIN=""
168168
if command -v ollama &>/dev/null; then
@@ -206,7 +206,7 @@ if [ -n "$OLLAMA_BIN" ]; then
206206
PULLED=false
207207
# Try primary pick, then fallbacks
208208
for TRY_MODEL in "$BASE_MODEL" "qwen3:8b" "tripolskypetr/qwen3.5-uncensored-aggressive:4b" "qwen3:4b"; do
209-
if $OLLAMA_BIN pull "$TRY_MODEL" 2>/dev/null; then
209+
if $OLLAMA_BIN pull "$TRY_MODEL"; then
210210
BASE_MODEL="$TRY_MODEL"
211211
PULLED=true
212212
break
@@ -215,16 +215,19 @@ if [ -n "$OLLAMA_BIN" ]; then
215215
done
216216

217217
if [ "$PULLED" = true ]; then
218-
# Create hackcode-uncensored alias via Modelfile
218+
echo -e " ${GREEN}Model pulled ✓${NC}"
219+
220+
# Step 5: Create hackcode-uncensored alias
221+
echo -e "${GREEN}[5/5]${NC} Creating hackcode-uncensored model..."
219222
HACKCODE_CFG="${HOME}/.config/hackcode"
220223
mkdir -p "$HACKCODE_CFG"
221224
cat > "${HACKCODE_CFG}/Modelfile" << MODELFILE
222225
FROM ${BASE_MODEL}
223226
PARAMETER temperature 0.7
224227
PARAMETER num_ctx 32768
225228
MODELFILE
226-
$OLLAMA_BIN create hackcode-uncensored -f "${HACKCODE_CFG}/Modelfile" 2>/dev/null
227-
echo -e " ${GREEN}Model ready as ${BOLD}hackcode-uncensored${NC} ${GREEN}${NC}"
229+
$OLLAMA_BIN create hackcode-uncensored -f "${HACKCODE_CFG}/Modelfile"
230+
echo -e " ${GREEN}hackcode-uncensored ready ${NC}"
228231
else
229232
echo -e " ${RED}Could not pull any model${NC}"
230233
echo -e " ${DIM}Run: ollama pull qwen3:8b && hackcode --setup${NC}"

0 commit comments

Comments
 (0)