From 8d3a605500951fc7f4c6eb9defd4b61afd1695e4 Mon Sep 17 00:00:00 2001 From: Mikael Roos Date: Wed, 4 Mar 2015 11:32:33 +0100 Subject: [PATCH] rearranging files to bin --- cache.bash | 36 -------------------- create-img-single.bash | 74 ------------------------------------------ 2 files changed, 110 deletions(-) delete mode 100755 cache.bash delete mode 100755 create-img-single.bash diff --git a/cache.bash b/cache.bash deleted file mode 100755 index 22c69e7..0000000 --- a/cache.bash +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/bash - -# -# Specify the utilities used -# -ECHO="printf" - - - -# -# Main, start by checking basic usage -# -if [ $# -lt 1 ] -then - $ECHO "Usage: $0 [cache-dir]\n" - exit 1 -elif [ ! -d "$1" ]; then - $ECHO "Usage: $0 [cache-dir]\n" - $ECHO "$1 is not a directory.\n" - exit 1 -fi - - - -# -# Print out details on cache-directory -# -$ECHO "Total size: $( du -sh $1 | cut -f1 )" -$ECHO "\nNumber of files: $( find $1 | wc -l )" -$ECHO "\n\nTop-5 largest files:\n" -$ECHO "$( du -s $1/* | sort -nr | head -5 )" -$ECHO "\n\nLast-5 created files:\n" -$ECHO "$( find $1/* -printf '%TY-%Tm-%Td %TH:%TM %p\n' | sort -r | head -5 )" -$ECHO "\n\nLast-5 accessed files:\n" -$ECHO "$( find $1/* -printf '%AY-%Am-%Ad %AH:%AM %f\n' | sort -r | head -5 )" -$ECHO "\n" diff --git a/create-img-single.bash b/create-img-single.bash deleted file mode 100755 index 99c3aff..0000000 --- a/create-img-single.bash +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -# -# Paths and settings -# -TARGET_D="webroot/imgd.php" -TARGET_P="webroot/imgp.php" -TARGET_S="webroot/imgs.php" -NEWLINES="\n\n\n" - - - -# -# Specify the utilities used -# -ECHO="printf" - - - -# -# Main, start by checking basic usage -# -if [ $# -gt 0 ] -then - $ECHO "Usage: $0\n" - exit 1 -fi - - - -# -# Print out details on cache-directory -# -$ECHO "Creating '$TARGET_D', '$TARGET_P' and '$TARGET_S' by combining the following files:" -$ECHO "\n" -$ECHO "\n webroot/img_header.php" -$ECHO "\n CHttpGet.php" -$ECHO "\n CRemoteImage.php" -$ECHO "\n CImage.php" -$ECHO "\n webroot/img.php" -$ECHO "\n" -$ECHO "\n'$TARGET_D' is for development mode." -$ECHO "\n'$TARGET_P' is for production mode (default mode)." -$ECHO "\n'$TARGET_S' is for strict mode." -$ECHO "\n" - -$ECHO "\nPress enter to continue. " -read answer - - -# -# Create the $TARGET_? files -# -cat webroot/img_header.php > $TARGET_P -cat webroot/img_header.php | sed "s|//'mode' => 'production',|'mode' => 'development',|" > $TARGET_D -cat webroot/img_header.php | sed "s|//'mode' => 'production',|'mode' => 'development',|" > $TARGET_S - -$ECHO "$NEWLINES" | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null - -tail -n +2 CHttpGet.php | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null -$ECHO "$NEWLINES" | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null - -tail -n +2 CRemoteImage.php | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null -$ECHO "$NEWLINES" | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null - -tail -n +2 CImage.php | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null -$ECHO "$NEWLINES" | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null - -tail -n +2 webroot/img.php | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null -$ECHO "$NEWLINES" | tee -a $TARGET_D $TARGET_P $TARGET_S > /dev/null - -$ECHO "\nDone." -$ECHO "\n" -$ECHO "\n"