Skip to content
This repository has been archived by the owner on May 3, 2023. It is now read-only.

Commit

Permalink
close #38 Fix the -g option
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasTu committed Nov 22, 2017
1 parent 18bf421 commit 9613b52
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions imagizor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,9 @@ download_verifikation() {
}

#>>==========================================================================>>
# DESCRIPTION: Checked if a value is given
# DESCRIPTION: Checked if the value is given
#
# PARAMETER 1: Checked if a value is given
# PARAMETER 1: Checked if the value is given
# RETURN: -
# USAGE: download_verifikation
#
Expand Down Expand Up @@ -677,6 +677,14 @@ case $ARG_OPTION in
;;
esac

if [ $ARG_OPTION = -g ]; then
declare -g FILENAME=$(basename $2 | sed 's/.$//' | sed 's/.$//' | sed 's/.$//' )
elif [ $ARG_OPTION = --gunzip ]; then
declare -g FILENAME=$(basename $2 | sed 's/.$//' | sed 's/.$//' | sed 's/.$//' )
else
declare FILENAME="$(basename $2)"
fi

declare FILESIZE=$(du -h $FILENAME | awk '{print $1}')
declare SIZE=""
declare SIZE_WHOLE=""
Expand Down

0 comments on commit 9613b52

Please sign in to comment.