Skip to content

Instantly share code, notes, and snippets.

@gedex
Created May 12, 2012 10:05
Show Gist options
  • Save gedex/2665629 to your computer and use it in GitHub Desktop.
Save gedex/2665629 to your computer and use it in GitHub Desktop.
wpized
#!/bin/bash
UNAME=$(uname)
if [ "$UNAME" != "Linux" -a "$UNAME" != "Darwin" ] ; then
echo "Your OS is NOT supported yet."
exit 1
fi
# Find the wpized dir, following one level of symlink. Note that symlink
# can be relative or absolute. Too bad 'readlink -f' is not portable.
CURRENT_DIR=$(pwd)
cd $(dirname "$0")
if [ -L "$(basename $0)" ] ; then
cd $(dirname $(readlink $(basename "$0") ) )
fi
WPIZED_DIR=$(pwd -P)
WPIZED="$WPIZED_DIR/wpized_cli/wpized.php"
cd "$CURRENT_DIR"
exec "/usr/bin/php" "$WPIZED --current_dir $CURRENT_DIR --wpized_dir $WPIZED_DIR" "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment