Skip to content
Snippets Groups Projects
Commit ae9f94f1 authored by kurzum's avatar kurzum
Browse files

replaced copy with links

parent b186c6b4
No related branches found
No related tags found
No related merge requests found
...@@ -22,17 +22,19 @@ fi ...@@ -22,17 +22,19 @@ fi
#/data/extraction/wikidumps/enwiki/20191001 #/data/extraction/wikidumps/enwiki/20191001
git clone "https://github.com/dbpedia/databus-maven-plugin.git" $DATABUSDIR &>/dev/null # git clone "https://github.com/dbpedia/databus-maven-plugin.git" $DATABUSDIR &>/dev/null
cd $DATABUSDIR # cd $DATABUSDIR
git pull # git pull
# copy # creates links in databus dir
# iterate all .ttl.bz2 files # iterate all .ttl.bz2 files
# uncomment for testing # uncomment for testing
for path in $(find "$EXTRACTIONBASEDIR" -name "*.ttl.bz2" | sort); do for path in $(find "$EXTRACTIONBASEDIR" -name "*.ttl.bz2" | sort); do
mapAndCopy $path mapAndLink $path
done done
exit
# deploy # deploy
cd $DATABUSDIR/dbpedia/$GROUP; cd $DATABUSDIR/dbpedia/$GROUP;
mvn versions:set -DnewVersion=$(ls * | grep '^[0-9]\{4\}.[0-9]\{2\}.[0-9]\{2\}$' | sort -u | tail -1); mvn versions:set -DnewVersion=$(ls * | grep '^[0-9]\{4\}.[0-9]\{2\}.[0-9]\{2\}$' | sort -u | tail -1);
......
...@@ -18,7 +18,7 @@ CONFIGDIR="$ROOT/extractionConfiguration" ...@@ -18,7 +18,7 @@ CONFIGDIR="$ROOT/extractionConfiguration"
DIEFDIR="$ROOT/marvin-extraction/extraction-framework" DIEFDIR="$ROOT/marvin-extraction/extraction-framework"
LOGDIR="$ROOT/marvin-extraction/logs/$(date +%Y-%m-%d)" && mkdir -p $LOGDIR LOGDIR="$ROOT/marvin-extraction/logs/$(date +%Y-%m-%d)" && mkdir -p $LOGDIR
EXTRACTIONBASEDIR="$ROOT/marvin-extraction/wikidumps" && mkdir -p $EXTRACTIONBASEDIR EXTRACTIONBASEDIR="$ROOT/marvin-extraction/wikidumps" && mkdir -p $EXTRACTIONBASEDIR
DATABUSDIR="$ROOT/marvin-extraction/databus-maven-plugin" DATABUSDIR="$ROOT/databus-poms"
############## ##############
# functions # functions
...@@ -148,7 +148,9 @@ mapNamesToDatabus() { ...@@ -148,7 +148,9 @@ mapNamesToDatabus() {
esac esac
} }
mapAndCopy() { # creates links in databus dir
mapAndLink() {
# each individual file
path=$1 path=$1
# split filename # split filename
...@@ -195,7 +197,8 @@ mapAndCopy() { ...@@ -195,7 +197,8 @@ mapAndCopy() {
# copy # copy
# TODO enable after testing # TODO enable after testing
cp -n "$path" "$targetFolder/$targetFile" #cp -n "$path" "$targetFolder/$targetFile"
ln -s "$path" "$targetFolder/$targetFile"
echo -e "< $path\n> $targetFolder/$targetFile\n----------------------" echo -e "< $path\n> $targetFolder/$targetFile\n----------------------"
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment