Initial commit - existing project files
This commit is contained in:
commit
c49798a9ea
82 changed files with 4304 additions and 0 deletions
21
lib/run-script.sh
Normal file
21
lib/run-script.sh
Normal file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# run a script in the context of the django project
|
||||
|
||||
export DJANGO_DEBUG="true"
|
||||
|
||||
if [ -z $2 ]; then
|
||||
|
||||
echo "Missing second argument <path>: the path to the script"
|
||||
|
||||
else
|
||||
|
||||
oldcwd="$(pwd)"
|
||||
script_path=$2
|
||||
echo "Starting $2 in a django shell:"
|
||||
echo -e "--------------------------------------------------------------------------------\n"
|
||||
cat "$script_path" | "$(pwd)/application/manage.py" shell
|
||||
echo -e "\n--------------------------------------------------------------------------------"
|
||||
cd "$oldcwd"
|
||||
|
||||
fi
|
Loading…
Add table
Add a link
Reference in a new issue