-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwpcr
More file actions
executable file
·39 lines (33 loc) · 908 Bytes
/
wpcr
File metadata and controls
executable file
·39 lines (33 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/bin/bash
# TODO: add config options for wp-config.php
# including: user, pw, db_name, host &
# define( 'JETPACK_DEV_DEBUG', true );
if [ $? != 0 ]
then
exit 1
fi
VIP=false
DB_NAME=
DB_USER="root"
DB_PASSWORD=
SITE_NAME=$1
OPTIND=2
while getopts vd:u:p: flag; do
case $flag in
v) VIP=true;;
d) DB_NAME=$OPTARG;;
u) DB_USER=$OPTARG;;
p) DB_PASSWORD=$OPTARG;;
\?) echo "Invalid option: -$OPTARG" >&2 ; exit 1;;
esac
done
svn co http://core.svn.wordpress.org/trunk/ $SITE_NAME
cp $SITE_NAME/wp-config-sample.php $SITE_NAME/wp-config.php
sed -i '' "s/database_name_here/$DB_NAME/" $SITE_NAME/wp-config.php
sed -i '' "s/username_here/$DB_USER/" $SITE_NAME/wp-config.php
sed -i '' "s/password_here/$DB_PASSWORD/" $SITE_NAME/wp-config.php
if $VIP
then
echo "$1/wp-content/themes/vip/plugins"
svn co https://vip-svn.wordpress.com/plugins/ "$1/wp-content/themes/vip/plugins"
fi