Skip to content

Commit

Permalink
Copy only selected files to import directory
Browse files Browse the repository at this point in the history
  • Loading branch information
kthoden committed Sep 7, 2020
1 parent cb6f3db commit db71471
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eoa.rc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function cpdi(){
cp $1 $destination
}

# function to import new publication
function pimp(){
# function to import new publication into EOAPP1.5
function pimp15(){
current_dir=$(pwd);
pnumber=$(grep '^Number:' $do/$1/django/publication.cfg| cut -f 2 -d ":"| tr -d '[:space:]');
pseries=$(grep '^Serie:' $do/$1/django/publication.cfg| cut -f 2 -d ":"| tr -d '[:space:]'| tr '[:upper:]' '[:lower:]');
Expand All @@ -68,7 +68,10 @@ function pimp(){
if [ -d $e15/src/$import_dir ]; then
rm -vfr $e15/src/$import_dir;
fi
cp -rv $do/$1/django src/$import_dir;

mkdir -p src/$import_dir;

cp -rv $do/$1/django/{Cover.jpg,Django.xml,images,publication.cfg} src/$import_dir;
docker-compose exec webserver bash -c "python manage.py publicationimport ${import_dir}";
cd $current_dir;
}
Expand Down

0 comments on commit db71471

Please sign in to comment.