mirror of
https://github.com/cupcakearmy/nix-macos.git
synced 2026-11-22 11:03:42 +00:00
chore: remove plist stuff
This commit is contained in:
@@ -1,27 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Create secrets directory if it doesn't exist
|
|
||||||
mkdir -p secrets/plist
|
|
||||||
|
|
||||||
# Array of app IDs to export
|
|
||||||
APP_IDS=(
|
|
||||||
"com.lwouis.alt-tab-macos"
|
|
||||||
"com.jordanbaird.Ice"
|
|
||||||
"com.apphousekitchen.aldente-pro.plist"
|
|
||||||
"com.lihaoyun6.QuickRecorder.plist"
|
|
||||||
)
|
|
||||||
|
|
||||||
# Export each plist
|
|
||||||
for APP_ID in "${APP_IDS[@]}"; do
|
|
||||||
echo "Exporting $APP_ID..."
|
|
||||||
defaults export "$APP_ID" - >"secrets/plist/$APP_ID.plist"
|
|
||||||
|
|
||||||
# Check if export was successful
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Successfully exported $APP_ID to secrets/$APP_ID.plist"
|
|
||||||
else
|
|
||||||
echo "Failed to export $APP_ID"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All exports completed!"
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# Path to the plist directory
|
|
||||||
PLIST_DIR="secrets/plist"
|
|
||||||
|
|
||||||
# Check if the plist directory exists
|
|
||||||
if [ ! -d "$PLIST_DIR" ]; then
|
|
||||||
echo "Error: Directory $PLIST_DIR does not exist."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get all plist files in the directory
|
|
||||||
PLIST_FILES=("$PLIST_DIR"/*.plist)
|
|
||||||
|
|
||||||
# Check if there are any plist files
|
|
||||||
if [ ${#PLIST_FILES[@]} -eq 0 ] || [ "${PLIST_FILES[0]}" = "$PLIST_DIR/*.plist" ]; then
|
|
||||||
echo "No plist files found in $PLIST_DIR."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Import each plist
|
|
||||||
for PLIST_PATH in "${PLIST_FILES[@]}"; do
|
|
||||||
# Extract app ID from filename (remove path and .plist extension)
|
|
||||||
FILENAME=$(basename "$PLIST_PATH")
|
|
||||||
APP_ID="${FILENAME%.plist}"
|
|
||||||
|
|
||||||
echo "Importing $APP_ID..."
|
|
||||||
cat "$PLIST_PATH" | defaults import "$APP_ID" -
|
|
||||||
|
|
||||||
# Check if import was successful
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
echo "Successfully imported $APP_ID from $PLIST_PATH"
|
|
||||||
else
|
|
||||||
echo "Failed to import $APP_ID"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "All imports completed!"
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user