Skip to content

Commit

Permalink
shell fixes, comments
Browse files Browse the repository at this point in the history
  • Loading branch information
athalhammer committed Dec 16, 2023
1 parent 7cf6d0b commit d6919a1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions rpi/raspberry-danker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,20 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.


# Expects to be executed from ./danker "root" dir
# Expects AWS Cli and according settings
export MEM_PERC="90%"
export S3_BUCKET="danker"
export INDEX_FILE="index.html"
export PROJECT_LINKS=".allwiki.links"

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

filename=$(./danker.sh ALL)
bzip2 "$filename.rank"
VER=${filename//$PROJECT_LINKS/}
aws s3 cp s3://"$S3_BUCKET/$INDEX_FILE" .
sed "s/VERSION/$VER/" <./rpi/template > tmp
sed "s/VERSION/$VER/" < ./rpi/template > tmp
perl -i -p0e 's/ "distribution":\[/`cat tmp`/se' "$INDEX_FILE"
aws s3 cp "$INDEX_FILE" s3://"$S3_BUCKET"/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
aws s3 cp "$filename.rank.bz2" s3://"$S3_BUCKET"/ --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
Expand Down

0 comments on commit d6919a1

Please sign in to comment.