Skip to content

Commit

Permalink
use tmpdir env variable for rpi
Browse files Browse the repository at this point in the history
  • Loading branch information
athalhammer committed Oct 17, 2024
1 parent 16ecc45 commit ad0f3b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion rpi/raspberry-danker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@

# Expects to be executed from ./danker "root" dir
# Expects AWS Cli and according settings
export TMPDIR="./rpi_tmp"
export MEM_PERC="90%"

S3_BUCKET="danker"
INDEX_FILE="index.html"
PROJECT_LINKS=".allwiki.links"

# Compute PageRank and upload
filename=$(./danker.sh -k ALL)
bzip2 "$filename.rank"
VER=${filename//$PROJECT_LINKS/}
Expand All @@ -37,9 +39,12 @@ aws s3 cp "$filename.rank.bz2" s3://"$S3_BUCKET"/ --grants read=uri=http://acs.a
aws s3 cp "$filename.stats.txt" s3://"$S3_BUCKET"/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
rm "$filename"

# Prepare sitelinks
# Prepare sitelinks and upload
filename="${filename%.*}".sitelinks.count
sort -k1,1 ./*.site.links | cut -f 1 | uniq -c | awk '{print $2 "\t" $1}' > "$filename"
bzip2 "$filename"
aws s3 cp "$filename".bz2 s3://"$S3_BUCKET"/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers

# Cleanup
rm ./*.site.links
rm "$TMPDIR" -rf

0 comments on commit ad0f3b6

Please sign in to comment.