Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add IG export script #350

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions scripts/export-IG.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# URL of the file to download
url="https://simplifier.net/guide/implementierungsleitfaden-isik-modul-dokumentenaustausch-stufe-3/$exportaszipui"

# Folder to save the downloaded files
download_folder="downloaded_files"

# Create the download folder if it doesn't exist
mkdir -p "$download_folder"

# Use curl to download the file and follow redirects, saving the file with the correct name
#-L: Follow redirects.
# -J: Save the file with the server-specified name or the last part of the URL.
curl -LJO "$url"

# Check if the download was successful
if [ $? -eq 0 ]; then
# Get the downloaded filename
filename=$(ls -1 | grep "Implementierungsleitfaden*.zip" | head -n 1)

# Move the downloaded file to the specified folder
mv "$filename" "$download_folder/"

echo "File downloaded successfully and saved to: $download_folder/$filename"
else
echo "Error downloading the file."
fi
Loading