Skip to content

Instantly share code, notes, and snippets.

@0xc010d
Created September 19, 2012 12:16
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 0xc010d/3749346 to your computer and use it in GitHub Desktop.
Save 0xc010d/3749346 to your computer and use it in GitHub Desktop.
#!/bin/bash
NIBNAME=${@%/}
read -d '' EMPTYPLIST <<"EOF"
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
</dict>
</plist>
EOF
if [ -e "$NIBNAME" ]
then
if [ -f "$NIBNAME" ]
then
mv "$NIBNAME" "$NIBNAME~"
mkdir "$NIBNAME"
mv "$NIBNAME~" "$NIBNAME/keyedobjects.nib"
fi
echo $EMPTYPLIST > "$NIBNAME/classes.nib"
echo $EMPTYPLIST > "$NIBNAME/info.nib"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment