Skip to content

Commit

Permalink
port the scripts to pure sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ochurlaud committed Oct 19, 2019
1 parent cf0a928 commit 9bcfef9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions scripts/decrypt_dir
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash
#!/bin/sh

PROGRAM_NAME=$(basename $0)

function usage() {
usage () {
echo "Usage: $PROGRAM_NAME INPUT OUTPUT"
exit $1
}

if [[ "$#" -eq "1" ]] && [[ "$1" == "--help" ]] ; then
if [ "$#" -eq 1 ] && [ "$1" = "--help" ] ; then
usage 0
fi

if [[ "$#" -eq 2 ]] ; then
if [ "$#" -eq 2 ] ; then
INPUT=$1
OUTPUT=$2
mkdir -p $OUTPUT
Expand Down
8 changes: 4 additions & 4 deletions scripts/encrypt_dir
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash
#!/bin/sh

PROGRAM_NAME=$(basename $0)

function usage() {
usage () {
echo "Usage: $PROGRAM_NAME INPUT OUTPUT"
exit $1
}

if [[ "$#" -eq "1" ]] && [[ "$1" == "--help" ]] ; then
if [ "$#" -eq 1 ] && [ "$1" = "--help" ] ; then
usage 0
fi

if [[ "$#" -eq 2 ]] ; then
if [ "$#" -eq 2 ] ; then
INPUT=$1
OUTPUT=$2

Expand Down
8 changes: 4 additions & 4 deletions scripts/pdf_compressor
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#!/bin/bash
#!/bin/sh

PROGRAM_NAME=$(basename $0)

function usage() {
usage () {
echo "Usage: $PROGRAM_NAME INPUT OUTPUT"
exit $1
}

if [[ "$#" -eq "1" ]] && [[ "$1" == "--help" ]] ; then
if [ "$#" -eq 1 ] && [ "$1" = "--help" ] ; then
usage 0
fi

if [[ "$#" -eq 2 ]] ; then
if [ "$#" -eq 2 ] ; then
INPUT="$1"
OUTPUT="$2"
gs -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/ebook -dNOPAUSE -dQUIET -dBATCH -sOutputFile="$OUTPUT" "$INPUT"
Expand Down

0 comments on commit 9bcfef9

Please sign in to comment.