From ae9f94f1ff9958a73c22a2fd3c7201faa97b92e5 Mon Sep 17 00:00:00 2001 From: kurzum <kurzum@github.com> Date: Thu, 19 Mar 2020 09:37:58 +0100 Subject: [PATCH] replaced copy with links --- databus-release.sh | 12 +++++++----- functions.sh | 9 ++++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/databus-release.sh b/databus-release.sh index 6cf8260..5686734 100755 --- a/databus-release.sh +++ b/databus-release.sh @@ -22,17 +22,19 @@ fi #/data/extraction/wikidumps/enwiki/20191001 -git clone "https://github.com/dbpedia/databus-maven-plugin.git" $DATABUSDIR &>/dev/null -cd $DATABUSDIR -git pull +# git clone "https://github.com/dbpedia/databus-maven-plugin.git" $DATABUSDIR &>/dev/null +# cd $DATABUSDIR +# git pull -# copy +# creates links in databus dir # iterate all .ttl.bz2 files # uncomment for testing for path in $(find "$EXTRACTIONBASEDIR" -name "*.ttl.bz2" | sort); do - mapAndCopy $path + mapAndLink $path done +exit + # deploy cd $DATABUSDIR/dbpedia/$GROUP; mvn versions:set -DnewVersion=$(ls * | grep '^[0-9]\{4\}.[0-9]\{2\}.[0-9]\{2\}$' | sort -u | tail -1); diff --git a/functions.sh b/functions.sh index 317b905..78284a4 100755 --- a/functions.sh +++ b/functions.sh @@ -18,7 +18,7 @@ CONFIGDIR="$ROOT/extractionConfiguration" DIEFDIR="$ROOT/marvin-extraction/extraction-framework" LOGDIR="$ROOT/marvin-extraction/logs/$(date +%Y-%m-%d)" && mkdir -p $LOGDIR EXTRACTIONBASEDIR="$ROOT/marvin-extraction/wikidumps" && mkdir -p $EXTRACTIONBASEDIR -DATABUSDIR="$ROOT/marvin-extraction/databus-maven-plugin" +DATABUSDIR="$ROOT/databus-poms" ############## # functions @@ -148,7 +148,9 @@ mapNamesToDatabus() { esac } -mapAndCopy() { +# creates links in databus dir +mapAndLink() { + # each individual file path=$1 # split filename @@ -195,7 +197,8 @@ mapAndCopy() { # copy # 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----------------------" } -- GitLab