refactor: Use jq instead of custom posix complient json.sh
Some checks failed
Lint / lint (push) Failing after 14s
Lint / lint (pull_request) Failing after 15s

While json.sh worked decently for reading json files, I didn't want to
implement writing to json files as well and make it completely
unreadable due to the added complexity.

So, I think its better to just use jq and keep things relatively simple
with the tradeoff of a lightweight dependency
This commit is contained in:
2026-06-26 18:19:23 +05:30
parent 780e79364f
commit 7f3ff45f05
4 changed files with 16 additions and 124 deletions

View File

@@ -41,7 +41,7 @@ else
BOOTSTRAP_SOURCE_DIR="$BOOTSTRAP_TMP_DIR"
_BASE_URL="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master"
_LIBS=("lib/common.sh" "lib/rollback.sh" "lib/platform.sh" "lib/shell_config.sh" "lib/json.sh" "lib/plugins.sh")
_LIBS=("lib/common.sh" "lib/rollback.sh" "lib/platform.sh" "lib/shell_config.sh" "lib/plugins.sh")
_curl_args=()
for _lib in "${_LIBS[@]}"; do
@@ -82,7 +82,6 @@ install_bootstrap() {
"lib/rollback.sh"
"lib/platform.sh"
"lib/shell_config.sh"
"lib/json.sh"
"lib/plugins.sh"
"commands/help.sh"
"commands/con.sh"
@@ -90,6 +89,11 @@ install_bootstrap() {
"commands/up.sh"
)
if ! pkg_check jq >/dev/null 2>&1; then
log_info "jq is missing. Installing jq..."
pkg_install jq
fi
if [ -f "$_SCRIPT_DIR/b.sh" ] && [ -f "$_SCRIPT_DIR/lib/routes.sh" ]; then
log_info "Using local files from repository..."
for file in "${files[@]}"; do