@sebastienrousseau/dotfiles 0.2.469 → 0.2.499
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.
- package/docs/ARCHITECTURE.md +62 -0
- package/docs/COMPLIANCE.md +47 -0
- package/docs/COPYRIGHT +6 -0
- package/docs/OPERATIONS.md +103 -0
- package/docs/PLAN.md +161 -0
- package/docs/PR_DESCRIPTION.md +150 -0
- package/docs/ROADMAP.md +148 -0
- package/docs/ROADMAP_legacy.md +556 -0
- package/docs/SECURITY_CHECKLIST.md +25 -0
- package/docs/TASK.md +99 -0
- package/docs/WALKTHROUGH.md +46 -0
- package/package.json +64 -76
- package/scripts/backup.sh +142 -0
- package/{dist/scripts → scripts}/banner.sh +1 -1
- package/scripts/benchmark.sh +20 -0
- package/{dist/scripts → scripts}/build.sh +1 -1
- package/{dist/scripts → scripts}/clean.sh +1 -1
- package/{dist/scripts → scripts}/compile.sh +1 -1
- package/{dist/scripts → scripts}/copy.sh +1 -1
- package/scripts/detect-collisions.py +84 -0
- package/scripts/doctor.sh +79 -0
- package/{dist/scripts → scripts}/dotfiles.sh +1 -1
- package/{dist/scripts → scripts}/download.sh +1 -1
- package/{dist/scripts → scripts}/help.sh +1 -1
- package/scripts/lock-configs.sh +57 -0
- package/scripts/package.sh +46 -0
- package/{dist/scripts → scripts}/ssh.sh +1 -1
- package/scripts/teleport.sh +23 -0
- package/scripts/test-aliases.sh +25 -0
- package/scripts/test_smoke.sh +88 -0
- package/{dist/scripts → scripts}/unpack.sh +1 -1
- package/scripts/verify_state.sh +60 -0
- package/templates/projects/go/README.md +3 -0
- package/templates/projects/go/cmd/__PROJECT_NAME__/main.go +7 -0
- package/templates/projects/go/go.mod +3 -0
- package/templates/projects/node/README.md +3 -0
- package/templates/projects/node/package.json +10 -0
- package/templates/projects/node/src/index.js +2 -0
- package/templates/projects/python/README.md +3 -0
- package/templates/projects/python/pyproject.toml +10 -0
- package/templates/projects/python/src/__PROJECT_NAME__/__init__.py +1 -0
- package/templates/projects/python/tests/test_basic.py +2 -0
- package/LICENSE +0 -1283
- package/README.md +0 -398
- package/dist/Makefile +0 -140
- package/dist/bin/backup.d.ts +0 -3
- package/dist/bin/backup.d.ts.map +0 -1
- package/dist/bin/backup.js +0 -4
- package/dist/bin/backup.js.map +0 -1
- package/dist/bin/constants.d.ts +0 -7
- package/dist/bin/constants.d.ts.map +0 -1
- package/dist/bin/constants.js +0 -2
- package/dist/bin/constants.js.map +0 -1
- package/dist/bin/copy.d.ts +0 -3
- package/dist/bin/copy.d.ts.map +0 -1
- package/dist/bin/copy.js +0 -3
- package/dist/bin/copy.js.map +0 -1
- package/dist/bin/dotfiles.d.ts +0 -3
- package/dist/bin/dotfiles.d.ts.map +0 -1
- package/dist/bin/dotfiles.js +0 -2
- package/dist/bin/dotfiles.js.map +0 -1
- package/dist/bin/download.d.ts +0 -3
- package/dist/bin/download.d.ts.map +0 -1
- package/dist/bin/download.js +0 -2
- package/dist/bin/download.js.map +0 -1
- package/dist/bin/index.d.ts +0 -2
- package/dist/bin/index.d.ts.map +0 -1
- package/dist/bin/index.js +0 -1
- package/dist/bin/index.js.map +0 -1
- package/dist/bin/transfer.d.ts +0 -3
- package/dist/bin/transfer.d.ts.map +0 -1
- package/dist/bin/transfer.js +0 -4
- package/dist/bin/transfer.js.map +0 -1
- package/dist/bin/unpack.d.ts +0 -3
- package/dist/bin/unpack.d.ts.map +0 -1
- package/dist/bin/unpack.js +0 -3
- package/dist/bin/unpack.js.map +0 -1
- package/dist/filesizes.txt +0 -382
- package/dist/lib/README.md +0 -86
- package/dist/lib/aliases/README.md +0 -57
- package/dist/lib/aliases/archives/README.md +0 -145
- package/dist/lib/aliases/archives/archives.aliases.sh +0 -114
- package/dist/lib/aliases/cd/README.md +0 -146
- package/dist/lib/aliases/cd/cd.aliases.sh +0 -51
- package/dist/lib/aliases/chmod/README.md +0 -160
- package/dist/lib/aliases/chmod/chmod.aliases.sh +0 -107
- package/dist/lib/aliases/clear/README.md +0 -37
- package/dist/lib/aliases/clear/clear.aliases.sh +0 -71
- package/dist/lib/aliases/configuration/README.md +0 -39
- package/dist/lib/aliases/configuration/configuration.aliases.sh +0 -70
- package/dist/lib/aliases/default/README.md +0 -40
- package/dist/lib/aliases/default/default.aliases.sh +0 -139
- package/dist/lib/aliases/dig/README.md +0 -37
- package/dist/lib/aliases/dig/dig.aliases.sh +0 -43
- package/dist/lib/aliases/disk-usage/README.md +0 -36
- package/dist/lib/aliases/disk-usage/du.aliases.sh +0 -84
- package/dist/lib/aliases/editor/README.md +0 -53
- package/dist/lib/aliases/editor/editor.aliases.sh +0 -26
- package/dist/lib/aliases/find/README.md +0 -46
- package/dist/lib/aliases/find/find.aliases.sh +0 -60
- package/dist/lib/aliases/gcloud/README.md +0 -63
- package/dist/lib/aliases/gcloud/gcloud.aliases.sh +0 -335
- package/dist/lib/aliases/git/README.md +0 -153
- package/dist/lib/aliases/git/git.aliases.sh +0 -544
- package/dist/lib/aliases/gnu/README.md +0 -89
- package/dist/lib/aliases/gnu/gnucoreutils-aliases.sh +0 -150
- package/dist/lib/aliases/heroku/README.md +0 -430
- package/dist/lib/aliases/heroku/heroku.aliases.sh +0 -1053
- package/dist/lib/aliases/interactive/README.md +0 -55
- package/dist/lib/aliases/interactive/interactive.aliases.sh +0 -50
- package/dist/lib/aliases/list/README.md +0 -131
- package/dist/lib/aliases/list/list.aliases.sh +0 -132
- package/dist/lib/aliases/macOS/README.md +0 -42
- package/dist/lib/aliases/macOS/macos.aliases.sh +0 -65
- package/dist/lib/aliases/make/README.md +0 -32
- package/dist/lib/aliases/make/make.aliases.sh +0 -35
- package/dist/lib/aliases/mkdir/README.md +0 -30
- package/dist/lib/aliases/mkdir/mkdir.aliases.sh +0 -29
- package/dist/lib/aliases/npm/README.md +0 -41
- package/dist/lib/aliases/npm/npm.aliases.sh +0 -61
- package/dist/lib/aliases/permission/README.md +0 -47
- package/dist/lib/aliases/permission/permission.aliases.sh +0 -73
- package/dist/lib/aliases/pnpm/README.md +0 -53
- package/dist/lib/aliases/pnpm/pnpm.aliases.sh +0 -76
- package/dist/lib/aliases/ps/README.md +0 -29
- package/dist/lib/aliases/ps/ps.aliases.sh +0 -20
- package/dist/lib/aliases/python/python.aliases.sh +0 -141
- package/dist/lib/aliases/rsync/README.md +0 -25
- package/dist/lib/aliases/rsync/rsync.aliases.sh +0 -17
- package/dist/lib/aliases/rust/README.md +0 -182
- package/dist/lib/aliases/rust/rust.aliases.sh +0 -119
- package/dist/lib/aliases/subversion/README.md +0 -66
- package/dist/lib/aliases/subversion/subversion.aliases.sh +0 -47
- package/dist/lib/aliases/sudo/README.md +0 -27
- package/dist/lib/aliases/sudo/sudo.aliases.sh +0 -20
- package/dist/lib/aliases/tmux/README.md +0 -31
- package/dist/lib/aliases/tmux/tmux.aliases.sh +0 -36
- package/dist/lib/aliases/update/README.md +0 -38
- package/dist/lib/aliases/update/update.aliases.sh +0 -310
- package/dist/lib/aliases/uuid/README.md +0 -24
- package/dist/lib/aliases/uuid/uuid.aliases.sh +0 -19
- package/dist/lib/aliases/wget/README.md +0 -27
- package/dist/lib/aliases/wget/wget.aliases.sh +0 -22
- package/dist/lib/aliases.sh +0 -50
- package/dist/lib/configurations/README.md +0 -18
- package/dist/lib/configurations/bash/bashrc +0 -167
- package/dist/lib/configurations/curl/cacert.pem +0 -3460
- package/dist/lib/configurations/curl/curlrc +0 -53
- package/dist/lib/configurations/default/color.sh +0 -24
- package/dist/lib/configurations/default/constants.sh +0 -43
- package/dist/lib/configurations/default/editor.sh +0 -18
- package/dist/lib/configurations/default/prompt.sh +0 -48
- package/dist/lib/configurations/gem/gemrc +0 -9
- package/dist/lib/configurations/input/inputrc +0 -23
- package/dist/lib/configurations/jshint/jshintrc +0 -37
- package/dist/lib/configurations/nano/nanorc +0 -35
- package/dist/lib/configurations/profile/profile +0 -37
- package/dist/lib/configurations/prompt/prompt.sh +0 -81
- package/dist/lib/configurations/tmux/default +0 -18
- package/dist/lib/configurations/tmux/display +0 -30
- package/dist/lib/configurations/tmux/linux +0 -18
- package/dist/lib/configurations/tmux/navigation +0 -30
- package/dist/lib/configurations/tmux/panes +0 -10
- package/dist/lib/configurations/tmux/theme +0 -29
- package/dist/lib/configurations/tmux/tmux +0 -21
- package/dist/lib/configurations/vim/vimrc +0 -193
- package/dist/lib/configurations/wget/wgetrc +0 -40
- package/dist/lib/configurations/zsh/zshrc +0 -50
- package/dist/lib/configurations.sh +0 -45
- package/dist/lib/functions/README.md +0 -92
- package/dist/lib/functions/apihealth.sh +0 -277
- package/dist/lib/functions/apilatency.sh +0 -157
- package/dist/lib/functions/apiload.sh +0 -165
- package/dist/lib/functions/backup.sh +0 -143
- package/dist/lib/functions/cdls.sh +0 -60
- package/dist/lib/functions/curlheader.sh +0 -78
- package/dist/lib/functions/curlstatus.sh +0 -74
- package/dist/lib/functions/curltime.sh +0 -75
- package/dist/lib/functions/encode64.sh +0 -107
- package/dist/lib/functions/environment.sh +0 -78
- package/dist/lib/functions/extract.sh +0 -86
- package/dist/lib/functions/freespace.sh +0 -67
- package/dist/lib/functions/genpwd.sh +0 -105
- package/dist/lib/functions/goto.sh +0 -67
- package/dist/lib/functions/hexdump.sh +0 -96
- package/dist/lib/functions/hiddenfiles.sh +0 -77
- package/dist/lib/functions/hostinfo.sh +0 -98
- package/dist/lib/functions/hstats.sh +0 -75
- package/dist/lib/functions/httpdebug.sh +0 -113
- package/dist/lib/functions/kebabcase.sh +0 -61
- package/dist/lib/functions/keygen.sh +0 -194
- package/dist/lib/functions/last.sh +0 -112
- package/dist/lib/functions/logout.sh +0 -120
- package/dist/lib/functions/lowercase.sh +0 -61
- package/dist/lib/functions/matrix.sh +0 -216
- package/dist/lib/functions/mount_read_only.sh +0 -11
- package/dist/lib/functions/myproc.sh +0 -9
- package/dist/lib/functions/prependpath.sh +0 -21
- package/dist/lib/functions/ql.sh +0 -9
- package/dist/lib/functions/rd.sh +0 -17
- package/dist/lib/functions/remove_disk.sh +0 -11
- package/dist/lib/functions/ren.sh +0 -73
- package/dist/lib/functions/sentencecase.sh +0 -63
- package/dist/lib/functions/showhiddenfiles.sh +0 -14
- package/dist/lib/functions/size.sh +0 -16
- package/dist/lib/functions/snakecase.sh +0 -61
- package/dist/lib/functions/stopwatch.sh +0 -15
- package/dist/lib/functions/sysinfo.sh +0 -145
- package/dist/lib/functions/titlecase.sh +0 -65
- package/dist/lib/functions/uppercase.sh +0 -61
- package/dist/lib/functions/view-source.sh +0 -9
- package/dist/lib/functions/vscode.sh +0 -32
- package/dist/lib/functions/whoisport.sh +0 -14
- package/dist/lib/functions/zipf.sh +0 -16
- package/dist/lib/functions.sh +0 -46
- package/dist/lib/history.sh +0 -90
- package/dist/lib/paths/README.md +0 -52
- package/dist/lib/paths/custom.paths.sh +0 -40
- package/dist/lib/paths/default.paths.sh +0 -37
- package/dist/lib/paths.sh +0 -46
- package/dist/scripts/backup.sh +0 -95
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# MIT License
|
|
3
|
+
# Copyright (c) 2026 Sebastien Rousseau
|
|
4
|
+
# See LICENSE file for details.
|
|
5
|
+
|
|
6
|
+
# Script: lock-configs.sh
|
|
7
|
+
# Description: Toggles immutability flags on critical configuration files.
|
|
8
|
+
# Usage: lock-configs [lock|unlock]
|
|
9
|
+
|
|
10
|
+
set -e
|
|
11
|
+
|
|
12
|
+
ACTION="${1:-lock}"
|
|
13
|
+
CRITICAL_FILES=(
|
|
14
|
+
"$HOME/.zshrc"
|
|
15
|
+
"$HOME/.bashrc"
|
|
16
|
+
"$HOME/.profile"
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
# Determine OS command for immutability
|
|
20
|
+
if [[ "$OSTYPE" == "darwin"* ]]; then
|
|
21
|
+
LOCK_CMD="chflags uchg"
|
|
22
|
+
UNLOCK_CMD="chflags nouchg"
|
|
23
|
+
CHECK_CMD="ls -lO"
|
|
24
|
+
else
|
|
25
|
+
# Linux (requires root usually, but we'll try)
|
|
26
|
+
if command -v chattr >/dev/null; then
|
|
27
|
+
LOCK_CMD="sudo chattr +i"
|
|
28
|
+
UNLOCK_CMD="sudo chattr -i"
|
|
29
|
+
CHECK_CMD="lsattr"
|
|
30
|
+
else
|
|
31
|
+
echo "❌ 'chattr' not found. Cannot set immutability on Linux without it."
|
|
32
|
+
exit 1
|
|
33
|
+
fi
|
|
34
|
+
fi
|
|
35
|
+
|
|
36
|
+
if [[ "$ACTION" == "lock" ]]; then
|
|
37
|
+
echo "🔒 Locking critical configuration files..."
|
|
38
|
+
CMD="$LOCK_CMD"
|
|
39
|
+
elif [[ "$ACTION" == "unlock" ]]; then
|
|
40
|
+
echo "🔓 Unlocking critical configuration files..."
|
|
41
|
+
CMD="$UNLOCK_CMD"
|
|
42
|
+
else
|
|
43
|
+
echo "Usage: $0 [lock|unlock]"
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
for file in "${CRITICAL_FILES[@]}"; do
|
|
48
|
+
if [[ -f "$file" ]]; then
|
|
49
|
+
echo "Processing: $file"
|
|
50
|
+
$CMD "$file" || echo "⚠️ Failed to modify flags for $file (permission denied?)"
|
|
51
|
+
fi
|
|
52
|
+
done
|
|
53
|
+
|
|
54
|
+
echo "Done. Environment state:"
|
|
55
|
+
for file in "${CRITICAL_FILES[@]}"; do
|
|
56
|
+
[[ -f "$file" ]] && $CHECK_CMD "$file"
|
|
57
|
+
done
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Script: package.sh
|
|
3
|
+
# Description: Bundles the dotfiles for distribution or backup.
|
|
4
|
+
# Generates a standard .tar.gz archive and validates structure.
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
VERSION="${1:-v0.2.471}"
|
|
9
|
+
DIST_DIR="dist"
|
|
10
|
+
ARCHIVE_NAME="dotfiles-${VERSION}.tar.gz"
|
|
11
|
+
|
|
12
|
+
echo "📦 Packaging Dotfiles (${VERSION})..."
|
|
13
|
+
|
|
14
|
+
# Create dist directory
|
|
15
|
+
mkdir -p "$DIST_DIR"
|
|
16
|
+
|
|
17
|
+
# Create artifact manifest
|
|
18
|
+
echo "Manifest generated at $(date)" > "$DIST_DIR/MANIFEST.txt"
|
|
19
|
+
echo "Version: ${VERSION}" >> "$DIST_DIR/MANIFEST.txt"
|
|
20
|
+
echo "Commit: $(git rev-parse HEAD)" >> "$DIST_DIR/MANIFEST.txt"
|
|
21
|
+
|
|
22
|
+
# Archive core files (excluding sensitive data/git)
|
|
23
|
+
# Using git archive for clean export if possible, fallback to tar
|
|
24
|
+
if git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
|
25
|
+
echo " -> EXPORT: Using git archive..."
|
|
26
|
+
git archive --format=tar.gz \
|
|
27
|
+
--output="$DIST_DIR/$ARCHIVE_NAME" \
|
|
28
|
+
--prefix="dotfiles-${VERSION}/" \
|
|
29
|
+
HEAD
|
|
30
|
+
else
|
|
31
|
+
echo " -> EXPORT: Using tar (fallback)..."
|
|
32
|
+
tar --exclude='.git' \
|
|
33
|
+
--exclude='dist' \
|
|
34
|
+
--exclude='secrets' \
|
|
35
|
+
-czf "$DIST_DIR/$ARCHIVE_NAME" .
|
|
36
|
+
fi
|
|
37
|
+
|
|
38
|
+
echo " -> CHECKSUM: Generating sha256..."
|
|
39
|
+
if command -v shasum >/dev/null; then
|
|
40
|
+
shasum -a 256 "$DIST_DIR/$ARCHIVE_NAME" > "$DIST_DIR/${ARCHIVE_NAME}.sha256"
|
|
41
|
+
else
|
|
42
|
+
sha256sum "$DIST_DIR/$ARCHIVE_NAME" > "$DIST_DIR/${ARCHIVE_NAME}.sha256"
|
|
43
|
+
fi
|
|
44
|
+
|
|
45
|
+
echo "✅ Package created at ${DIST_DIR}/${ARCHIVE_NAME}"
|
|
46
|
+
echo " Size: $(du -h "$DIST_DIR/$ARCHIVE_NAME" | cut -f1)"
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Script: teleport.sh
|
|
3
|
+
# Description: Deploys dotfiles to a remote host ephemerally.
|
|
4
|
+
# Usage: ./teleport.sh user@hostname
|
|
5
|
+
|
|
6
|
+
set -e
|
|
7
|
+
|
|
8
|
+
TARGET="$1"
|
|
9
|
+
|
|
10
|
+
if [[ -z "$TARGET" ]]; then
|
|
11
|
+
echo "Usage: $0 user@host"
|
|
12
|
+
exit 1
|
|
13
|
+
fi
|
|
14
|
+
|
|
15
|
+
echo "🚀 Teleporting dotfiles to ${TARGET}..."
|
|
16
|
+
|
|
17
|
+
# 1. Archive the current state
|
|
18
|
+
# 2. Pipe to SSH
|
|
19
|
+
# 3. Extract in remote home directory
|
|
20
|
+
chezmoi archive | ssh "$TARGET" "tar xz -C ~"
|
|
21
|
+
|
|
22
|
+
echo "✅ Teleport successful!"
|
|
23
|
+
echo " Note: Changes are applied to files, but shell may need restart or sourcing."
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# MIT License
|
|
3
|
+
# Copyright (c) 2026 Sebastien Rousseau
|
|
4
|
+
# See LICENSE file for details.
|
|
5
|
+
|
|
6
|
+
# Script: test-aliases.sh
|
|
7
|
+
# Description: Verifies disjoint alias files for syntax errors.
|
|
8
|
+
|
|
9
|
+
set -e
|
|
10
|
+
|
|
11
|
+
echo "Testing alias syntax..."
|
|
12
|
+
|
|
13
|
+
ALIAS_DIR="$HOME/.local/share/chezmoi/.chezmoitemplates/aliases"
|
|
14
|
+
|
|
15
|
+
find "$ALIAS_DIR" -name "*.aliases.sh" | while read -r file; do
|
|
16
|
+
# Check for syntax errors using bash -n
|
|
17
|
+
if bash -n "$file"; then
|
|
18
|
+
echo "✅ Checked: $(basename "$file")"
|
|
19
|
+
else
|
|
20
|
+
echo "❌ Syntax Error: $(basename "$file")"
|
|
21
|
+
exit 1
|
|
22
|
+
fi
|
|
23
|
+
done
|
|
24
|
+
|
|
25
|
+
echo "All alias files passed syntax check."
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
set -uo pipefail
|
|
3
|
+
|
|
4
|
+
# Colors for output
|
|
5
|
+
GREEN='\033[0;32m'
|
|
6
|
+
RED='\033[0;31m'
|
|
7
|
+
NC='\033[0m' # No Color
|
|
8
|
+
|
|
9
|
+
echo "----------------------------------------------------------------"
|
|
10
|
+
echo "🔥 Running Dotfiles Smoke Tests..."
|
|
11
|
+
echo "----------------------------------------------------------------"
|
|
12
|
+
|
|
13
|
+
failed=0
|
|
14
|
+
|
|
15
|
+
check_cmd() {
|
|
16
|
+
local cmd=$1
|
|
17
|
+
if command -v "$cmd" >/dev/null 2>&1; then
|
|
18
|
+
if [ "$cmd" = "tmux" ]; then
|
|
19
|
+
local version
|
|
20
|
+
version=$($cmd -V 2>/dev/null || echo "v?")
|
|
21
|
+
else
|
|
22
|
+
local version
|
|
23
|
+
version=$($cmd --version 2>/dev/null || echo "v?")
|
|
24
|
+
fi
|
|
25
|
+
echo -e "${GREEN}✔ Found: $cmd ($version)${NC}"
|
|
26
|
+
else
|
|
27
|
+
echo -e "${RED}✘ Missing: $cmd${NC}"
|
|
28
|
+
failed=1
|
|
29
|
+
fi
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
check_cask() {
|
|
33
|
+
local app=$1
|
|
34
|
+
# Skip GUI checks in CI or on Linux
|
|
35
|
+
if [[ "${CI:-}" == "true" ]] || [[ "$(uname -s)" == "Linux" ]]; then
|
|
36
|
+
echo -e "${GREEN}○ Skipping GUI App: $app (CI/Linux detected)${NC}"
|
|
37
|
+
return 0
|
|
38
|
+
fi
|
|
39
|
+
|
|
40
|
+
if [ -d "/Applications/$app.app" ] || [ -d "${HOME}/Applications/$app.app" ]; then
|
|
41
|
+
echo -e "${GREEN}✔ Found App: $app${NC}"
|
|
42
|
+
else
|
|
43
|
+
# Fallback check for CLI tools installed via cask (e.g. ghostty might be CLI accessible)
|
|
44
|
+
if command -v "$app" >/dev/null 2>&1; then
|
|
45
|
+
echo -e "${GREEN}✔ Found App (CLI): $app${NC}"
|
|
46
|
+
else
|
|
47
|
+
echo -e "${RED}✘ Missing App: $app${NC}"
|
|
48
|
+
failed=1
|
|
49
|
+
fi
|
|
50
|
+
fi
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
echo "Testing Core Toolchain..."
|
|
54
|
+
check_cmd git
|
|
55
|
+
check_cmd chezmoi
|
|
56
|
+
check_cmd age
|
|
57
|
+
check_cmd zsh
|
|
58
|
+
|
|
59
|
+
if [ -n "${DOTFILES_CI_SKIP_EXTRAS:-}" ]; then
|
|
60
|
+
echo "Skipping optional tool checks (CI mode detected)"
|
|
61
|
+
else
|
|
62
|
+
echo "Testing Modern Replacements..."
|
|
63
|
+
check_cmd rg
|
|
64
|
+
check_cmd eza
|
|
65
|
+
check_cmd bat
|
|
66
|
+
check_cmd fzf
|
|
67
|
+
check_cmd zoxide
|
|
68
|
+
|
|
69
|
+
echo "Testing Roadmap Additions..."
|
|
70
|
+
check_cmd gh
|
|
71
|
+
check_cmd nvim
|
|
72
|
+
check_cmd tmux
|
|
73
|
+
check_cmd yazi
|
|
74
|
+
check_cmd zellij
|
|
75
|
+
fi
|
|
76
|
+
|
|
77
|
+
echo "Testing GUI Apps (Casks)..."
|
|
78
|
+
check_cask "Ghostty"
|
|
79
|
+
check_cask "Zed"
|
|
80
|
+
|
|
81
|
+
echo "----------------------------------------------------------------"
|
|
82
|
+
if [ $failed -eq 0 ]; then
|
|
83
|
+
echo -e "${GREEN}✅ All Smoke Tests Passed!${NC}"
|
|
84
|
+
exit 0
|
|
85
|
+
else
|
|
86
|
+
echo -e "${RED}❌ Some tests failed.${NC}"
|
|
87
|
+
exit 1
|
|
88
|
+
fi
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# MIT License
|
|
3
|
+
# Copyright (c) 2026 Sebastien Rousseau
|
|
4
|
+
# See LICENSE file for details.
|
|
5
|
+
|
|
6
|
+
# Script: verify_state.sh
|
|
7
|
+
# Description: Final verification of the dotfiles environment state.
|
|
8
|
+
|
|
9
|
+
set -e
|
|
10
|
+
|
|
11
|
+
echo "🔍 Starting Final Environment Verification..."
|
|
12
|
+
|
|
13
|
+
Errors=0
|
|
14
|
+
|
|
15
|
+
check_file() {
|
|
16
|
+
if [[ ! -f "$1" ]]; then
|
|
17
|
+
echo "❌ Missing file: $1"
|
|
18
|
+
Errors=$((Errors + 1))
|
|
19
|
+
else
|
|
20
|
+
echo "✅ Found file: $1"
|
|
21
|
+
fi
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
check_alias_in_config() {
|
|
25
|
+
if ! grep -q "$1" "$HOME/.config/shell/aliases.sh"; then
|
|
26
|
+
echo "❌ Missing alias definition '$1' in built config"
|
|
27
|
+
Errors=$((Errors + 1))
|
|
28
|
+
else
|
|
29
|
+
echo "✅ Verified alias: $1"
|
|
30
|
+
fi
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
# 1. Verify Docs
|
|
34
|
+
check_file ".chezmoitemplates/aliases/security/README.md"
|
|
35
|
+
check_file ".chezmoitemplates/aliases/legal/README.md"
|
|
36
|
+
|
|
37
|
+
# 2. Verify Scripts
|
|
38
|
+
check_file "scripts/lock-configs.sh"
|
|
39
|
+
check_file "scripts/detect-collisions.py"
|
|
40
|
+
check_file "scripts/test-aliases.sh"
|
|
41
|
+
|
|
42
|
+
# 3. Verify Generated Config Content (Key Features)
|
|
43
|
+
# Security
|
|
44
|
+
check_alias_in_config "lock-configs"
|
|
45
|
+
check_alias_in_config "unlock-configs"
|
|
46
|
+
check_alias_in_config "enable-signing"
|
|
47
|
+
# Legal
|
|
48
|
+
check_alias_in_config "scan-licenses"
|
|
49
|
+
check_alias_in_config "add-headers"
|
|
50
|
+
|
|
51
|
+
# 4. Verify Workflows
|
|
52
|
+
check_file ".github/workflows/security-release.yml"
|
|
53
|
+
|
|
54
|
+
if [[ $Errors -eq 0 ]]; then
|
|
55
|
+
echo "🎉 Verification Passed! All systems nominal."
|
|
56
|
+
exit 0
|
|
57
|
+
else
|
|
58
|
+
echo "⚠️ Verification Failed with $Errors errors."
|
|
59
|
+
exit 1
|
|
60
|
+
fi
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""__PROJECT_NAME__ package."""
|