Created
May 12, 2012 10:05
-
-
Save gedex/2665629 to your computer and use it in GitHub Desktop.
wpized
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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