Skip to content

Commit

Permalink
Merge remote-tracking branch 'jouyouyun/main' into jouyouyun-main
Browse files Browse the repository at this point in the history
  • Loading branch information
ellermister committed Aug 20, 2022
2 parents 05004bd + e4e66e2 commit 15feb12
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

chunkBytesSize=$(expr 1024 \* 5) # KB
outPath=outs
realImage=bbb.jpg
realImage=bbb.png
action=$1
filePath=$2

Expand Down Expand Up @@ -122,7 +122,7 @@ if [[ -z $action || -z $filePath ]];then
fi

if [ ! -f $filePath ];then
echo 'The file not exist!'
echo "$filePath: not exist!"
exit 1
fi

Expand All @@ -131,6 +131,10 @@ if [ ! -d $outPath ];then
fi

if [ $action == "upload" ];then
if [ ! -f $realImage ];then
echo "$realImage: not exist!"
exit 1
fi
split_to_chunk_file $filePath
elif [ $action == "download" ];then
recover_backup_file $filePath
Expand Down

0 comments on commit 15feb12

Please sign in to comment.