Update the init_data script to be compatible with putting the sample data profile in a tmpfs
This commit is contained in:
parent
938a725f39
commit
eaa9f4c404
@ -4,10 +4,10 @@ set -e
|
|||||||
|
|
||||||
THIS_DIR=$(readlink -f $0 | xargs dirname)
|
THIS_DIR=$(readlink -f $0 | xargs dirname)
|
||||||
|
|
||||||
if [[ -e "$THIS_DIR/profile" ]]; then
|
if [[ -d "$THIS_DIR/profile" ]] && [ "$(ls -A "$THIS_DIR"/profile)" ]; then
|
||||||
rm -r $THIS_DIR/profile
|
rm -r $THIS_DIR/profile/*
|
||||||
fi
|
fi
|
||||||
mkdir $THIS_DIR/profile
|
mkdir -p $THIS_DIR/profile
|
||||||
|
|
||||||
test -e $THIS_DIR/profile/twitter.db && rm $THIS_DIR/profile/twitter.db
|
test -e $THIS_DIR/profile/twitter.db && rm $THIS_DIR/profile/twitter.db
|
||||||
sqlite3 $THIS_DIR/profile/twitter.db < $THIS_DIR/seed_data.sql
|
sqlite3 $THIS_DIR/profile/twitter.db < $THIS_DIR/seed_data.sql
|
||||||
|
Loading…
x
Reference in New Issue
Block a user