From 405cc9af81d0235cc1b8147e4bb019269a6b6dcc Mon Sep 17 00:00:00 2001 From: Emily Frost Date: Tue, 29 Jun 2021 11:55:17 -0500 Subject: [PATCH] Removed nyan to put in its own repository. --- nyan | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100755 nyan diff --git a/nyan b/nyan deleted file mode 100755 index ca6a11f..0000000 --- a/nyan +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/bash -optstring="o:" -declare -i abort=0 - -# TODO: Check for dependencies pv and stat. - -while getopts ${optstring} args; do - case $args in - o) output_file=${OPTARG} ;; - :) echo "Output file required." ;; - esac -done -shift $((OPTIND-1)) - -echo "Concatenating files..." -declare -i total_size=0 -for fname in "$@"; do - if [ ! -e "$fname" ]; then - abort=1 - echo "${fname} does not exist." - elif [ -d "$fname" ]; then - abort=1 - echo "${fname} is a directory." - else - current_file_size=$(stat -c%s "$fname") - total_size=$((total_size+current_file_size)) - # TODO: Use something more legible than bytes. - echo "Adding ${fname} at ${total_size}b." - fi -done - -if [ $abort -eq 0 ]; then - cat "$@" | pv -epts "$total_size" > "$output_file" - echo "Done!" -else - echo "Errors occurred, concatenation aborted." -fi