mirror of
https://github.com/sortedcord/bootstrap.git
synced 2026-07-23 04:32:49 +05:30
merge
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
# shellcheck shell=bash
|
||||
# Command: con
|
||||
# Edits configurations in ~/.config/
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# shellcheck shell=bash
|
||||
# Command: help
|
||||
# Lists all available bootstrap commands and installers
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# shellcheck shell=bash
|
||||
# Command: uninstall (gone)
|
||||
# Removes bootstrap CLI and cleans up shell configuration files
|
||||
|
||||
@@ -45,7 +46,6 @@ if [ -f "$HOME/.bash_aliases" ]; then
|
||||
|
||||
# 2. Remove specific aliases added by bootstrap (e.g. vim -> nvim)
|
||||
if grep -q '^alias vim="nvim"$' "$HOME/.bash_aliases" 2>/dev/null; then
|
||||
local tmp_file
|
||||
tmp_file=$(mktemp)
|
||||
sed '/^alias vim="nvim"$/d' "$HOME/.bash_aliases" > "$tmp_file"
|
||||
cat "$tmp_file" > "$HOME/.bash_aliases"
|
||||
@@ -61,7 +61,6 @@ fi
|
||||
|
||||
# If force is false, leave a lightweight 'b back' shortcut function in shell config files
|
||||
if [ "$FORCE" = "false" ]; then
|
||||
local b_back_content
|
||||
b_back_content=$(cat << 'EOF'
|
||||
b() {
|
||||
if [ "${1:-}" = "back" ]; then
|
||||
@@ -78,6 +77,9 @@ EOF
|
||||
fi
|
||||
|
||||
# Remove the installation directory
|
||||
rm -rf "$BOOTSTRAP_DATA_DIR"
|
||||
rm -rf "$BOOTSTRAP_STATE_DIR"
|
||||
rm -rf "$BOOTSTRAP_CACHE_DIR"
|
||||
rm -rf "${BOOTSTRAP_DIR:-$HOME/.config/bootstrap}"
|
||||
|
||||
if [ "$FORCE" = "true" ]; then
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
# shellcheck shell=bash
|
||||
# Command: up
|
||||
# Manually checks for updates and runs the updater if a newer version is found.
|
||||
|
||||
# Source libraries if needed
|
||||
if [ -z "${_LIB_COMMON_SOURCED:-}" ]; then
|
||||
_LIB_DIR="${BOOTSTRAP_DIR:-$HOME/.config/bootstrap}/lib"
|
||||
# shellcheck source=/dev/null
|
||||
. "$_LIB_DIR/common.sh"
|
||||
fi
|
||||
|
||||
@@ -14,7 +16,7 @@ log_info "Checking for updates..."
|
||||
local_ver="0.0.0"
|
||||
version_file="${BOOTSTRAP_DIR:-$HOME/.config/bootstrap}/VERSION"
|
||||
if [ -f "$version_file" ]; then
|
||||
local_ver=$(cat "$version_file" | tr -d '[:space:]')
|
||||
local_ver=$(tr -d '[:space:]' < "$version_file")
|
||||
fi
|
||||
|
||||
base_url="https://git.adityagupta.dev/sortedcord/bootstrap/raw/branch/master"
|
||||
|
||||
Reference in New Issue
Block a user