karnel-termux 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +1 -1
  2. package/karnel/tools/ai/antigravity-cli/install.sh +4 -2
  3. package/karnel/tools/ai/claude-code/install.sh +7 -6
  4. package/karnel/tools/ai/cline/install.sh +2 -6
  5. package/karnel/tools/ai/codegraph/install.sh +9 -9
  6. package/karnel/tools/ai/codex/install.sh +2 -7
  7. package/karnel/tools/ai/command-code/install.sh +2 -12
  8. package/karnel/tools/ai/crush/install.sh +4 -5
  9. package/karnel/tools/ai/ctx7/install.sh +5 -5
  10. package/karnel/tools/ai/engram/install.sh +2 -7
  11. package/karnel/tools/ai/freebuff/install.sh +4 -2
  12. package/karnel/tools/ai/gemini-cli/install.sh +2 -7
  13. package/karnel/tools/ai/gentle-ai/install.sh +4 -4
  14. package/karnel/tools/ai/gga/install.sh +7 -7
  15. package/karnel/tools/ai/hermes-agent/install.sh +2 -5
  16. package/karnel/tools/ai/kilocode-cli/install.sh +2 -9
  17. package/karnel/tools/ai/kimchi-code/bin/kimchi +27 -0
  18. package/karnel/tools/ai/kimchi-code/helper/kimchi_helper.c +47 -0
  19. package/karnel/tools/ai/kimchi-code/install.sh +4 -3
  20. package/karnel/tools/ai/kimi-code/install.sh +2 -12
  21. package/karnel/tools/ai/kiro/install.sh +4 -5
  22. package/karnel/tools/ai/mimocode/install.sh +4 -3
  23. package/karnel/tools/ai/minimax-cli/install.sh +2 -12
  24. package/karnel/tools/ai/mistral-vibe/install.sh +2 -7
  25. package/karnel/tools/ai/odysseus/install.sh +5 -3
  26. package/karnel/tools/ai/ollama/install.sh +2 -7
  27. package/karnel/tools/ai/omni-route/install.sh +5 -4
  28. package/karnel/tools/ai/openclaude/install.sh +2 -7
  29. package/karnel/tools/ai/openclaw/install.sh +2 -7
  30. package/karnel/tools/ai/opencode/install.sh +9 -8
  31. package/karnel/tools/ai/openspec/install.sh +5 -5
  32. package/karnel/tools/ai/pi/install.sh +2 -7
  33. package/karnel/tools/ai/qwen-code/install.sh +2 -7
  34. package/karnel/tools/auto/n8n/install.sh +2 -2
  35. package/karnel/tools/db/all.sh +0 -2
  36. package/karnel/tools/db/mariadb/install.sh +2 -2
  37. package/karnel/tools/db/mongodb/install.sh +2 -2
  38. package/karnel/tools/db/postgresql/install.sh +2 -2
  39. package/karnel/tools/db/redis/install.sh +0 -1
  40. package/karnel/tools/db/sqlite/install.sh +2 -2
  41. package/karnel/tools/deploy/netlify/install.sh +6 -2
  42. package/karnel/tools/deploy/railway/install.sh +5 -6
  43. package/karnel/tools/deploy/vercel/install.sh +6 -2
  44. package/karnel/tools/dev/bat/install.sh +2 -6
  45. package/karnel/tools/dev/bc/install.sh +2 -6
  46. package/karnel/tools/dev/cloudflared/install.sh +2 -6
  47. package/karnel/tools/dev/curl/install.sh +2 -6
  48. package/karnel/tools/dev/fzf/install.sh +2 -6
  49. package/karnel/tools/dev/gh/install.sh +2 -6
  50. package/karnel/tools/dev/html2text/install.sh +2 -6
  51. package/karnel/tools/dev/imagemagick/install.sh +2 -6
  52. package/karnel/tools/dev/jq/install.sh +2 -6
  53. package/karnel/tools/dev/lsd/install.sh +2 -6
  54. package/karnel/tools/dev/make/install.sh +2 -6
  55. package/karnel/tools/dev/ncurses/install.sh +2 -6
  56. package/karnel/tools/dev/proot/install.sh +2 -6
  57. package/karnel/tools/dev/shfmt/install.sh +2 -6
  58. package/karnel/tools/dev/tmate/install.sh +2 -6
  59. package/karnel/tools/dev/translate/install.sh +2 -6
  60. package/karnel/tools/dev/tree/install.sh +2 -6
  61. package/karnel/tools/dev/udocker/install.sh +2 -6
  62. package/karnel/tools/dev/wget/install.sh +2 -6
  63. package/karnel/tools/editor/code-server/install.sh +7 -2
  64. package/karnel/tools/editor/nvchad/install.sh +1 -1
  65. package/karnel/tools/lang/clang/install.sh +2 -5
  66. package/karnel/tools/lang/golang/install.sh +2 -5
  67. package/karnel/tools/lang/nodejs/install.sh +2 -5
  68. package/karnel/tools/lang/perl/install.sh +2 -5
  69. package/karnel/tools/lang/php/install.sh +2 -5
  70. package/karnel/tools/lang/python/install.sh +2 -5
  71. package/karnel/tools/lang/rust/install.sh +2 -5
  72. package/karnel/tools/npm/live-server/install.sh +2 -6
  73. package/karnel/tools/npm/localtunnel/install.sh +2 -6
  74. package/karnel/tools/npm/markserv/install.sh +2 -6
  75. package/karnel/tools/npm/ncu/install.sh +2 -6
  76. package/karnel/tools/npm/nestjs/install.sh +2 -6
  77. package/karnel/tools/npm/ngrok/install.sh +2 -6
  78. package/karnel/tools/npm/prettier/install.sh +2 -6
  79. package/karnel/tools/npm/psqlformat/install.sh +2 -6
  80. package/karnel/tools/npm/turbopack/bin/next-turbopack +55 -0
  81. package/karnel/tools/npm/turbopack/bin/node-glibc.sh +9 -0
  82. package/karnel/tools/npm/turbopack/bin/patch-interp.py +101 -0
  83. package/karnel/tools/npm/turbopack/bin/precheck-native.js +96 -0
  84. package/karnel/tools/npm/turbopack/install.sh +101 -31
  85. package/karnel/tools/npm/typescript/install.sh +2 -6
  86. package/karnel/tools/npm/vercel/install.sh +2 -6
  87. package/karnel/tools/shell/better-npm/install.sh +2 -1
  88. package/karnel/tools/shell/fzf-tab/install.sh +2 -1
  89. package/karnel/tools/shell/history-substring/install.sh +2 -1
  90. package/karnel/tools/shell/powerlevel10k/install.sh +2 -1
  91. package/karnel/tools/shell/you-should-use/install.sh +2 -1
  92. package/karnel/tools/shell/zsh-autopair/install.sh +2 -1
  93. package/karnel/tools/shell/zsh-autosuggestions/install.sh +2 -1
  94. package/karnel/tools/shell/zsh-completions/install.sh +2 -1
  95. package/karnel/tools/shell/zsh-defer/install.sh +2 -1
  96. package/karnel/tools/shell/zsh-syntax-highlighting/install.sh +2 -1
  97. package/karnel/utils/banner.sh +11 -0
  98. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
6
7
 
@@ -55,13 +56,7 @@ _uninstall_ollama_impl() {
55
56
  }
56
57
 
57
58
  update_ollama() {
58
- log_info "Updating Ollama..."
59
- mkdir -p "$(dirname "$LOG_FILE")"
60
-
61
- loading "Updating Ollama" _update_ollama_impl
62
-
63
- log_success "Ollama updated"
64
- return 0
59
+ _check_update_needed "Ollama" "$(_get_installed_pkg_version ollama)" "$(_get_remote_pkg_version ollama)" _update_ollama_impl
65
60
  }
66
61
 
67
62
  _update_ollama_impl() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
6
7
 
@@ -141,17 +142,17 @@ uninstall_omni_route() {
141
142
  }
142
143
 
143
144
  update_omni_route() {
145
+ _check_update_needed "omniRoute" "$(_get_installed_npm_version karnelroute)" "$(_get_remote_npm_version karnelroute)" _do_update_omni_route
146
+ }
147
+
148
+ _do_update_omni_route() {
144
149
  if ! _omni_route_ok; then
145
150
  install_omni_route
146
151
  return $?
147
152
  fi
148
153
 
149
- # Update the canonical local install (the one the wrappers actually use),
150
- # then re-apply the Termux/Android native fixes so it keeps working.
151
- log_info "Updating omniRoute..."
152
154
  if npm i karnelroute@latest --prefix "$HOME/.karnel/packages/karnelroute" 2>>"$LOG_FILE"; then
153
155
  _omni_route_apply_platform_fixes "$HOME/.karnel/packages/karnelroute"
154
- log_success "omniRoute updated"
155
156
  return 0
156
157
  else
157
158
  log_error "Failed to update omniRoute"
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
6
7
 
@@ -84,13 +85,7 @@ _uninstall_openclaude_impl() {
84
85
  }
85
86
 
86
87
  update_openclaude() {
87
- log_info "Updating OpenClaude..."
88
- mkdir -p "$(dirname "$LOG_FILE")"
89
-
90
- loading "Updating OpenClaude" _update_openclaude_impl
91
-
92
- log_success "OpenClaude updated"
93
- return 0
88
+ _check_update_needed "OpenClaude" "$(_get_installed_npm_version @gitlawb/openclaude)" "$(_get_remote_npm_version @gitlawb/openclaude)" _update_openclaude_impl
94
89
  }
95
90
 
96
91
  _update_openclaude_impl() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
6
7
 
@@ -86,13 +87,7 @@ _uninstall_openclaw_impl() {
86
87
  }
87
88
 
88
89
  update_openclaw() {
89
- log_info "Updating OpenClaw..."
90
- mkdir -p "$(dirname "$LOG_FILE")"
91
-
92
- loading "Updating OpenClaw" _update_openclaw_impl
93
-
94
- log_success "OpenClaw updated"
95
- return 0
90
+ _check_update_needed "OpenClaw" "$(_get_installed_npm_version openclaw)" "$(_get_remote_npm_version openclaw)" _update_openclaw_impl
96
91
  }
97
92
 
98
93
  _update_openclaw_impl() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
  import "@/utils/colors"
5
6
 
6
7
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
@@ -254,9 +255,10 @@ uninstall_opencode() {
254
255
  }
255
256
 
256
257
  update_opencode() {
257
- log_info "Updating OpenCode..."
258
- mkdir -p "$(dirname "$LOG_FILE")"
258
+ _check_update_needed "OpenCode" "$(_get_installed_version opencode)" "$(_get_remote_github_version anomalyco/opencode)" _do_update_opencode
259
+ }
259
260
 
261
+ _do_update_opencode() {
260
262
  if [ -f "$OPENCODE_DATA_DIR/opencode" ]; then
261
263
  _install_opencode_native
262
264
  return $?
@@ -265,11 +267,11 @@ update_opencode() {
265
267
  _opencode_proot_ubuntu /bin/bash -c 'rm -rf /root/.opencode' &>>"$LOG_FILE"
266
268
 
267
269
  _opencode_proot_ubuntu /bin/bash -c '
268
- export SHELL=/bin/bash
269
- export TMPDIR=/tmp
270
- export HOME=/root
271
- curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
272
- ' &>>"$LOG_FILE"
270
+ export SHELL=/bin/bash
271
+ export TMPDIR=/tmp
272
+ export HOME=/root
273
+ curl -fsSL https://opencode.ai/install | bash -s -- --no-modify-path
274
+ ' &>>"$LOG_FILE"
273
275
 
274
276
  local ubuntu_root
275
277
  ubuntu_root="$(_opencode_detect_ubuntu_root)"
@@ -280,7 +282,6 @@ update_opencode() {
280
282
  return 1
281
283
  fi
282
284
 
283
- log_success "OpenCode (proot-distro) updated"
284
285
  return 0
285
286
  }
286
287
 
@@ -4,6 +4,8 @@
4
4
  # Bridges human intent and AI output with structured technical specs
5
5
  # Stores specs in /openspec/ directory to guide AI agents
6
6
  # Official: npm install -g @fission-ai/openspec@latest
7
+ import "@/utils/log"
8
+ import "@/utils/version"
7
9
 
8
10
  install_openspec() {
9
11
  if command -v openspec &>/dev/null; then
@@ -41,12 +43,10 @@ uninstall_openspec() {
41
43
  }
42
44
 
43
45
  update_openspec() {
44
- if ! command -v openspec &>/dev/null; then
45
- log_warn "openspec is not installed"
46
- return 1
47
- fi
46
+ _check_update_needed "openspec" "$(_get_installed_npm_version @fission-ai/openspec)" "$(_get_remote_npm_version @fission-ai/openspec)" _do_update_openspec
47
+ }
48
48
 
49
- log_info "Updating openspec..."
49
+ _do_update_openspec() {
50
50
  npm update -g @fission-ai/openspec 2>/dev/null
51
51
  local _t
52
52
  _t=$(readlink -f "$PREFIX/bin/openspec" 2>/dev/null)
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env bash
2
2
  import "@/utils/log"
3
+ import "@/utils/version"
3
4
 
4
5
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
5
6
 
@@ -81,13 +82,7 @@ _uninstall_pi_impl() {
81
82
  }
82
83
 
83
84
  update_pi() {
84
- log_info "Updating Pi Coding Agent..."
85
- mkdir -p "$(dirname "$LOG_FILE")"
86
-
87
- loading "Updating Pi Coding Agent" _update_pi_impl
88
-
89
- log_success "Pi updated"
90
- return 0
85
+ _check_update_needed "Pi Coding Agent" "$(_get_installed_npm_version @earendil-works/pi-coding-agent)" "$(_get_remote_npm_version @earendil-works/pi-coding-agent)" _update_pi_impl
91
86
  }
92
87
 
93
88
  _update_pi_impl() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_ai.log"
6
7
 
@@ -85,13 +86,7 @@ _uninstall_qwen_code_impl() {
85
86
  }
86
87
 
87
88
  update_qwen_code() {
88
- log_info "Updating Qwen Code..."
89
- mkdir -p "$(dirname "$LOG_FILE")"
90
-
91
- loading "Updating Qwen Code" _update_qwen_code_impl
92
-
93
- log_success "Qwen Code updated successfully"
94
- return 0
89
+ _check_update_needed "Qwen Code" "$(_get_installed_npm_version @qwen-code/qwen-code)" "$(_get_remote_npm_version @qwen-code/qwen-code)" _update_qwen_code_impl
95
90
  }
96
91
 
97
92
  _update_qwen_code_impl() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_auto.log"
6
7
 
@@ -92,8 +93,7 @@ _update_n8n_impl() {
92
93
  }
93
94
 
94
95
  update_n8n() {
95
- log_info "Updating n8n..."
96
- loading "Updating n8n" _update_n8n_impl
96
+ _check_update_needed "n8n" "$(_get_installed_npm_version n8n)" "$(_get_remote_npm_version n8n)" _update_n8n_impl
97
97
  }
98
98
 
99
99
  reinstall_n8n() {
@@ -1,7 +1,5 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
- import "@/utils/log"
4
-
5
3
  LOG_FILE="$KARNEL_CACHE/install_db.log"
6
4
 
7
5
  DB_TOOLS=(
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_db.log"
6
7
 
@@ -55,8 +56,7 @@ _update_mariadb_impl() {
55
56
  }
56
57
 
57
58
  update_mariadb() {
58
- log_info "Updating MariaDB..."
59
- loading "Updating MariaDB" _update_mariadb_impl
59
+ _check_update_needed "MariaDB" "$(_get_installed_pkg_version mariadb)" "$(_get_remote_pkg_version mariadb)" _update_mariadb_impl
60
60
  }
61
61
 
62
62
  reinstall_mariadb() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_db.log"
6
7
 
@@ -63,8 +64,7 @@ _update_mongodb_impl() {
63
64
  }
64
65
 
65
66
  update_mongodb() {
66
- log_info "Updating MongoDB..."
67
- loading "Updating MongoDB" _update_mongodb_impl
67
+ _check_update_needed "MongoDB" "$(_get_installed_pkg_version mongodb)" "$(_get_remote_pkg_version mongodb)" _update_mongodb_impl
68
68
  }
69
69
 
70
70
  reinstall_mongodb() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_db.log"
6
7
 
@@ -55,8 +56,7 @@ _update_postgresql_impl() {
55
56
  }
56
57
 
57
58
  update_postgresql() {
58
- log_info "Updating PostgreSQL..."
59
- loading "Updating PostgreSQL" _update_postgresql_impl
59
+ _check_update_needed "PostgreSQL" "$(_get_installed_pkg_version postgresql)" "$(_get_remote_pkg_version postgresql)" _update_postgresql_impl
60
60
  }
61
61
 
62
62
  reinstall_postgresql() {
@@ -54,7 +54,6 @@ _do_redis_update() {
54
54
  }
55
55
 
56
56
  update_redis() {
57
- mkdir -p "$(dirname "$LOG_FILE")"
58
57
  _check_update_needed "Redis" "$(_get_installed_pkg_version redis "Redis")" "$(_get_remote_pkg_version redis)" _update_redis_impl
59
58
  }
60
59
 
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_db.log"
6
7
 
@@ -55,8 +56,7 @@ _update_sqlite_impl() {
55
56
  }
56
57
 
57
58
  update_sqlite() {
58
- log_info "Updating SQLite..."
59
- loading "Updating SQLite" _update_sqlite_impl
59
+ _check_update_needed "SQLite" "$(_get_installed_pkg_version sqlite)" "$(_get_remote_pkg_version sqlite)" _update_sqlite_impl
60
60
  }
61
61
 
62
62
  reinstall_sqlite() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  install_netlify() {
6
7
  if command -v netlify &>/dev/null; then
@@ -26,13 +27,16 @@ uninstall_netlify() {
26
27
  }
27
28
 
28
29
  update_netlify() {
29
- log_info "Updating Netlify CLI..."
30
+ _check_update_needed "Netlify CLI" "$(_get_installed_npm_version netlify-cli)" "$(_get_remote_npm_version netlify-cli)" _do_update_netlify
31
+ }
32
+
33
+ _do_update_netlify() {
30
34
  npm update -g netlify-cli &>/dev/null || {
31
35
  log_error "Failed to update Netlify CLI"
32
36
  return 1
33
37
  }
34
38
  command -v termux-fix-shebang &>/dev/null && termux-fix-shebang "$(command -v netlify)" &>/dev/null
35
- log_success "Netlify CLI updated"
39
+ return 0
36
40
  }
37
41
 
38
42
  reinstall_netlify() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_deploy.log"
6
7
  RAILWAY_DATA_DIR="$HOME/.local/share/karnel-data/railway"
@@ -90,16 +91,14 @@ uninstall_railway() {
90
91
  }
91
92
 
92
93
  update_railway() {
93
- if ! command -v railway &>/dev/null; then
94
- log_error "Railway CLI is not installed"
95
- return 1
96
- fi
97
- log_info "Updating Railway CLI..."
94
+ _check_update_needed "Railway CLI" "$(_get_installed_npm_version @railway/cli)" "$(_get_remote_npm_version @railway/cli)" _do_update_railway
95
+ }
96
+
97
+ _do_update_railway() {
98
98
  npm update -g @railway/cli --legacy-peer-deps &>>"$LOG_FILE" || {
99
99
  log_warn "npm update failed"
100
100
  return 1
101
101
  }
102
- log_success "Railway CLI updated"
103
102
  return 0
104
103
  }
105
104
 
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  VERCEL_BIN="$PREFIX/lib/node_modules/vercel/dist/vc.js"
6
7
 
@@ -28,13 +29,16 @@ uninstall_vercel() {
28
29
  }
29
30
 
30
31
  update_vercel() {
31
- log_info "Updating Vercel CLI..."
32
+ _check_update_needed "Vercel CLI" "$(_get_installed_npm_version vercel)" "$(_get_remote_npm_version vercel)" _do_update_vercel
33
+ }
34
+
35
+ _do_update_vercel() {
32
36
  npm update -g vercel &>/dev/null || {
33
37
  log_error "Failed to update Vercel CLI"
34
38
  return 1
35
39
  }
36
40
  command -v termux-fix-shebang &>/dev/null && termux-fix-shebang "$(command -v vercel)" &>/dev/null
37
- log_success "Vercel CLI updated"
41
+ return 0
38
42
  }
39
43
 
40
44
  reinstall_vercel() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_bat() {
68
69
  }
69
70
 
70
71
  update_bat() {
71
- log_info "Updating Bat..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_bat_pkg || return 1
75
- log_success "Bat updated"
76
- return 0
72
+ _check_update_needed "Bat" "$(_get_installed_pkg_version bat)" "$(_get_remote_pkg_version bat)" _update_bat_pkg
77
73
  }
78
74
 
79
75
  reinstall_bat() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_bc() {
68
69
  }
69
70
 
70
71
  update_bc() {
71
- log_info "Updating bc..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_bc_pkg || return 1
75
- log_success "bc updated"
76
- return 0
72
+ _check_update_needed "bc" "$(_get_installed_pkg_version bc)" "$(_get_remote_pkg_version bc)" _update_bc_pkg
77
73
  }
78
74
 
79
75
  reinstall_bc() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_cloudflared() {
68
69
  }
69
70
 
70
71
  update_cloudflared() {
71
- log_info "Updating Cloudflared..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_cloudflared_pkg || return 1
75
- log_success "Cloudflared updated"
76
- return 0
72
+ _check_update_needed "Cloudflared" "$(_get_installed_pkg_version cloudflared)" "$(_get_remote_pkg_version cloudflared)" _update_cloudflared_pkg
77
73
  }
78
74
 
79
75
  reinstall_cloudflared() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_curl() {
68
69
  }
69
70
 
70
71
  update_curl() {
71
- log_info "Updating Curl..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_curl_pkg || return 1
75
- log_success "Curl updated"
76
- return 0
72
+ _check_update_needed "cURL" "$(_get_installed_pkg_version curl)" "$(_get_remote_pkg_version curl)" _update_curl_pkg
77
73
  }
78
74
 
79
75
  reinstall_curl() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_fzf() {
68
69
  }
69
70
 
70
71
  update_fzf() {
71
- log_info "Updating Fzf..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_fzf_pkg || return 1
75
- log_success "Fzf updated"
76
- return 0
72
+ _check_update_needed "FZF" "$(_get_installed_pkg_version fzf)" "$(_get_remote_pkg_version fzf)" _update_fzf_pkg
77
73
  }
78
74
 
79
75
  reinstall_fzf() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_gh() {
68
69
  }
69
70
 
70
71
  update_gh() {
71
- log_info "Updating GitHub CLI..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_gh_pkg || return 1
75
- log_success "GitHub CLI updated"
76
- return 0
72
+ _check_update_needed "GitHub CLI" "$(_get_installed_pkg_version gh)" "$(_get_remote_pkg_version gh)" _update_gh_pkg
77
73
  }
78
74
 
79
75
  reinstall_gh() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_html2text() {
68
69
  }
69
70
 
70
71
  update_html2text() {
71
- log_info "Updating html2text..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_html2text_pkg || return 1
75
- log_success "html2text updated"
76
- return 0
72
+ _check_update_needed "html2text" "$(_get_installed_pkg_version html2text)" "$(_get_remote_pkg_version html2text)" _update_html2text_pkg
77
73
  }
78
74
 
79
75
  reinstall_html2text() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_imagemagick() {
68
69
  }
69
70
 
70
71
  update_imagemagick() {
71
- log_info "Updating ImageMagick..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_imagemagick_pkg || return 1
75
- log_success "ImageMagick updated"
76
- return 0
72
+ _check_update_needed "ImageMagick" "$(_get_installed_pkg_version imagemagick)" "$(_get_remote_pkg_version imagemagick)" _update_imagemagick_pkg
77
73
  }
78
74
 
79
75
  reinstall_imagemagick() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_jq() {
68
69
  }
69
70
 
70
71
  update_jq() {
71
- log_info "Updating jq..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_jq_pkg || return 1
75
- log_success "jq updated"
76
- return 0
72
+ _check_update_needed "JQ" "$(_get_installed_pkg_version jq)" "$(_get_remote_pkg_version jq)" _update_jq_pkg
77
73
  }
78
74
 
79
75
  reinstall_jq() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_lsd() {
68
69
  }
69
70
 
70
71
  update_lsd() {
71
- log_info "Updating LSD..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_lsd_pkg || return 1
75
- log_success "LSD updated"
76
- return 0
72
+ _check_update_needed "LSD" "$(_get_installed_pkg_version lsd)" "$(_get_remote_pkg_version lsd)" _update_lsd_pkg
77
73
  }
78
74
 
79
75
  reinstall_lsd() {
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env bash
2
2
 
3
3
  import "@/utils/log"
4
+ import "@/utils/version"
4
5
 
5
6
  LOG_FILE="$KARNEL_CACHE/install_dev.log"
6
7
 
@@ -68,12 +69,7 @@ uninstall_make() {
68
69
  }
69
70
 
70
71
  update_make() {
71
- log_info "Updating Make..."
72
- mkdir -p "$(dirname "$LOG_FILE")"
73
-
74
- _update_make_pkg || return 1
75
- log_success "Make updated"
76
- return 0
72
+ _check_update_needed "Make" "$(_get_installed_pkg_version make)" "$(_get_remote_pkg_version make)" _update_make_pkg
77
73
  }
78
74
 
79
75
  reinstall_make() {