Skip to content

Commit

Permalink
Cleaning up code
Browse files Browse the repository at this point in the history
Cleaning up some of the Windows code,

Adding version information across all scripts
  • Loading branch information
sethgoldin committed Mar 11, 2020
1 parent 486700f commit ca8c07c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 9 deletions.
13 changes: 8 additions & 5 deletions receive.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Lets check to make sure that mhl is properly installed
if (Get-Command mhl -errorAction Stop)
{}
echo "s3-xxHash-transfer receive.ps1 version 0.0.4"

# Lets check to make sure that mhl is properly installed

if ((Get-Command mhl.exe -ErrorAction SilentlyContinue) -eq $null)
{ throw "This script requires mhl.exe but it does not appear to be properly installed. Aborting. Please see https://mediahashlist.org/mhl-tool/ for more information." }

# Lets check to make sure that aws is properly installed
if (Get-Command aws -errorAction Stop)
{}
if ((Get-Command aws.exe -ErrorAction SilentlyContinue) -eq $null)
{ throw "This script requires aws.exe but it does not appear to be properly installed. Aborting. Please see https://aws.amazon.com/cli/ for more information." }

# Let's have the user specify from which bucket they'll be downloading

Expand Down
2 changes: 2 additions & 0 deletions receive.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

echo "s3-xxHash-transfer receive.sh version 0.0.4"

# Lets check to make sure that mhl is properly installed https://stackoverflow.com/a/677212/

command -v mhl >/dev/null 2>&1 || { echo >&2 "This script requires mhl but it does not appear to be properly installed. Aborting. Please see https://mediahashlist.org/mhl-tool/ for more information."; exit 1; }
Expand Down
11 changes: 7 additions & 4 deletions send.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
echo "s3-xxHash-transfer send.ps1 version 0.0.4"

# Lets check to make sure that mhl is properly installed
if (Get-Command mhl -errorAction Stop)
{}

if ((Get-Command mhl.exe -ErrorAction SilentlyContinue) -eq $null)
{ throw "This script requires mhl.exe but it does not appear to be properly installed. Aborting. Please see https://mediahashlist.org/mhl-tool/ for more information." }

# Lets check to make sure that aws is properly installed
if (Get-Command aws -errorAction Stop)
{}
if ((Get-Command aws.exe -ErrorAction SilentlyContinue) -eq $null)
{ throw "This script requires aws.exe but it does not appear to be properly installed. Aborting. Please see https://aws.amazon.com/cli/ for more information." }

# Let's have the user specify which source folder should be uploaded into S3

Expand Down
2 changes: 2 additions & 0 deletions send.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

echo "s3-xxHash-transfer send.sh version 0.0.4"

# Lets check to make sure that mhl is properly installed https://stackoverflow.com/a/677212/

command -v mhl >/dev/null 2>&1 || { echo >&2 "This script requires mhl but it does not appear to be properly installed. Aborting. Please see https://mediahashlist.org/mhl-tool/ for more information."; exit 1; }
Expand Down

0 comments on commit ca8c07c

Please sign in to comment.