Skip bundled app install if already exists
This commit is contained in:
parent
604ac96b30
commit
4853ee4f7a
|
|
@ -91,12 +91,16 @@ echo ">> Installing bundled apps"
|
|||
BUNDLED_APPS="clock code cron env stats versions"
|
||||
for app in $BUNDLED_APPS; do
|
||||
if [ -d "$DEST/apps/$app" ]; then
|
||||
if [ -d ~/apps/"$app" ]; then
|
||||
echo " $app (exists, skipping)"
|
||||
continue
|
||||
fi
|
||||
echo " $app"
|
||||
cp -r "$DEST/apps/$app" ~/apps/
|
||||
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)
|
||||
if [ -n "$version_dir" ]; then
|
||||
ln -sfn "$version_dir" ~/apps/$app/current
|
||||
(cd ~/apps/$app/current && bun install --frozen-lockfile) > /dev/null 2>&1 || true
|
||||
ln -sfn "$version_dir" ~/apps/"$app"/current
|
||||
(cd ~/apps/"$app"/current && bun install --frozen-lockfile) > /dev/null 2>&1 || true
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Bun.serve({
|
|||
headers: { "content-type": "text/plain" },
|
||||
})
|
||||
}
|
||||
return new Response("toes", { status: 404 })
|
||||
return new Response("404 Not Found", { status: 404 })
|
||||
},
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user