diff --git a/README.md b/README.md index 2e43fe04..52a506de 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ Useful cross-platform PowerShell scripts, to be used on the command-line (CLI) o PowerShell Scripts Included --------------------------- +* [download.ps1](Scripts/download.ps1) - downloads the file/directory from the given URL * [exe_info.ps1](Scripts/exe_info.ps1) - prints basic information of the given executable file * [lscmdlets.ps1](Scripts/lscmdlets.ps1) - lists all PowerShell cmdlets * [lsmods.ps1](Scripts/lsmods.ps1) - lists all PowerShell modules diff --git a/Scripts/download.ps1 b/Scripts/download.ps1 new file mode 100755 index 00000000..46038ca5 --- /dev/null +++ b/Scripts/download.ps1 @@ -0,0 +1,11 @@ +#!/snap/bin/powershell +# +# Syntax: ./download.ps1 +# Description: downloads the file/directory from the given URL +# Author: Markus Fleschutz +# Source: github.com/fleschutz/PowerShell +# License: CC0 + +param([string]$URL) +wget --mirror --convert-links --adjust-extension --page-requisites --no-parent $URL --directory-prefix . --no-verbose +exit 0 diff --git a/Scripts/download_homepage.ps1 b/Scripts/download_homepage.ps1 deleted file mode 100755 index 6f08cec5..00000000 --- a/Scripts/download_homepage.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -#!/snap/bin/powershell -# -# Syntax: ./download_homepage.ps1 -# Description: downloads from the given URL -# Author: Markus Fleschutz -# Source: github.com/fleschutz/PowerShell -# License: CC0 - -backup() -{ - URL=$1 - wget --mirror --convert-links --adjust-extension --page-requisites --no-parent $URL --directory-prefix . --no-verbose -} - -backup $1 -exit 0