Skip to content

Commit

Permalink
use correct url and search string
Browse files Browse the repository at this point in the history
  • Loading branch information
joergi committed Aug 4, 2023
1 parent 868dd85 commit a4be65d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions script-for-using-latest-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ IFS=$'\n\t'
# you don't need to run this script
# this is running automatically on Github each day to update the latest issues

TARGET_URL="https://helloworldraspberrypi.com/"
TARGET_URL="https://helloworld.raspberrypi.org/"
BASEDIR=$(dirname "$0")

#printf -v page_url "$TARGET_URL/issues"
page_url=$(printf '%s\n' "$TARGET_URL/issues")

latest_issue=$(curl -sf "$page_url" | grep "Get PDF" | head -n 1 | sed 's/^.*issues\///' | sed 's/\/pdf.*$//')
latest_issue=$(curl -sf "$page_url" | grep "Download Free PDF" | head -n 1 | sed 's/^.*issues\///' | sed 's/\/pdf.*$//')
echo "Latest Issue is " "$latest_issue"

file="$BASEDIR/regular-issues.txt";
Expand Down

0 comments on commit a4be65d

Please sign in to comment.