Renamed to download.ps1

This commit is contained in:
Markus Fleschutz 2020-09-29 18:35:44 +00:00
parent a05cbc54e5
commit 9d71c51c6f
3 changed files with 12 additions and 16 deletions

View File

@ -5,6 +5,7 @@ Useful cross-platform PowerShell scripts, to be used on the command-line (CLI) o
PowerShell Scripts Included 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 * [exe_info.ps1](Scripts/exe_info.ps1) - prints basic information of the given executable file
* [lscmdlets.ps1](Scripts/lscmdlets.ps1) - lists all PowerShell cmdlets * [lscmdlets.ps1](Scripts/lscmdlets.ps1) - lists all PowerShell cmdlets
* [lsmods.ps1](Scripts/lsmods.ps1) - lists all PowerShell modules * [lsmods.ps1](Scripts/lsmods.ps1) - lists all PowerShell modules

11
Scripts/download.ps1 Executable file
View File

@ -0,0 +1,11 @@
#!/snap/bin/powershell
#
# Syntax: ./download.ps1 <URL>
# 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

View File

@ -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