Skip to content
This repository was archived by the owner on Mar 4, 2019. It is now read-only.

Commit bdcddb2

Browse files
committed
Fixed script.
1 parent c702e8c commit bdcddb2

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

modules/custom/btrCore/data/import/vocabulary.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
#!/bin/bash -x
1+
#!/bin/bash
22
### Import the vocabulary projects.
33

44
### go to the script directory
55
cd $(dirname $0)
66

7-
### get the drush alias from the first argument
8-
drush="drush $1"
7+
### get config vars
8+
. ../config.sh
99

1010
origin='vocabulary'
1111
for file in $(ls vocabulary/*.po)
@@ -15,6 +15,13 @@ do
1515
project=${filename%.po}
1616
lng=${project##*_}
1717

18+
if test $($drush btrp-ls --origin=$origin --project=$project)
19+
then
20+
echo "Project $origin/$project already exists; skipping."
21+
continue
22+
fi
23+
24+
echo "Importing $origin/$project."
1825
### create a project and import translations
1926
$drush btrp-add $origin $project $(pwd)/$file
2027
$drush btrp-import $origin $project $lng $(pwd)/$file

0 commit comments

Comments
 (0)