Replace stats with metrics, improve version detection

This commit is contained in:
Chris Wanstrath 2026-03-01 21:47:15 -08:00
parent f475e1791e
commit 30b0ac1fc3

View File

@ -58,18 +58,19 @@ mkdir -p ~/data
mkdir -p ~/apps
echo ">> Installing bundled apps"
BUNDLED_APPS="clock code cron env stats versions"
BUNDLED_APPS="clock code cron env metrics versions"
for app in $BUNDLED_APPS; do
if [ -d "apps/$app" ]; then
echo " Installing $app..."
# Copy app to ~/apps
cp -r "apps/$app" ~/apps/
# Find the version directory and create current symlink
version_dir=$(ls -1 ~/apps/$app | grep -E '^[0-9]{8}-[0-9]{6}$' | sort -r | head -1)
version_dir=$(ls -1 ~/apps/$app | grep -E '^[0-9]{8}-[0-9]{6}$' | sort -r | head -1 || true)
if [ -n "$version_dir" ]; then
ln -sfn "$version_dir" ~/apps/$app/current
# Install dependencies
(cd ~/apps/$app/current && bun install --frozen-lockfile) > /dev/null 2>&1
elif [ -f ~/apps/$app/package.json ]; then
(cd ~/apps/$app && bun install --frozen-lockfile) > /dev/null 2>&1
fi
fi
done