1.0.0 release
This commit is contained in:
Executable
+41
@@ -0,0 +1,41 @@
|
||||
#!/usr/bin/env bash
|
||||
# Remove Lyrebird Xcode file templates from the user template dir.
|
||||
#
|
||||
# Deletes
|
||||
# ~/Library/Developer/Xcode/Templates/File Templates/Lyrebird/
|
||||
#
|
||||
# Run from repo root (or anywhere — script uses absolute home path):
|
||||
# bash scripts/uninstall-xcode-templates.sh
|
||||
# bash scripts/uninstall-xcode-templates.sh --dry-run
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
DRY_RUN=false
|
||||
case "${1:-}" in
|
||||
--dry-run|-n) DRY_RUN=true ;;
|
||||
"") ;;
|
||||
*) echo "usage: $0 [--dry-run]" >&2; exit 2 ;;
|
||||
esac
|
||||
|
||||
DEST="$HOME/Library/Developer/Xcode/Templates/File Templates/Lyrebird"
|
||||
|
||||
if [[ ! -d "$DEST" ]]; then
|
||||
echo "Nothing to remove. Templates not installed at:"
|
||||
echo " $DEST"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
COUNT=$(find "$DEST" -maxdepth 1 -type d -name "*.xctemplate" 2>/dev/null | wc -l | tr -d ' ')
|
||||
|
||||
echo "Removing Lyrebird template dir ($COUNT templates):"
|
||||
echo " $DEST"
|
||||
|
||||
if [[ "$DRY_RUN" == "true" ]]; then
|
||||
echo
|
||||
echo "(dry-run — no changes made)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
rm -rf "$DEST"
|
||||
echo
|
||||
echo "✓ Removed."
|
||||
Reference in New Issue
Block a user