aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Molkentin <daniel.molkentin@nokia.com>2011-12-09 21:12:50 +0100
committerEike Ziller <eike.ziller@nokia.com>2011-12-12 08:29:12 +0100
commit8961c373e931c6f49214de7cf3c9b87b6f877415 (patch)
tree51910aa56f6b33d084625ed68297c597183b7dbb /scripts
parent468a8f1bb881ccd3e3cfe5b19102607db37f5c0e (diff)
Remove obsolete scripts.
Change-Id: I6593687c933511d3b6578cf9c5c5ea33b5efc890 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/snapshots/cleanup_snapshots.sh87
-rwxr-xr-xscripts/snapshots/create_nullbyte_snapshots.sh58
2 files changed, 0 insertions, 145 deletions
diff --git a/scripts/snapshots/cleanup_snapshots.sh b/scripts/snapshots/cleanup_snapshots.sh
deleted file mode 100755
index 3d60dddc67..0000000000
--- a/scripts/snapshots/cleanup_snapshots.sh
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/env bash
-
-## Open script-dir-homed subshell
-(
-ABS_SCRIPT_DIR=$(cd $(dirname $(which "$0")) && pwd)
-cd "${ABS_SCRIPT_DIR}" || exit 1
-
-
-## Internal config
-KEEP_COUNT=7
-
-## External config
-DRY=0
-case "$1" in
--n)
- DRY=1
- ;;
---just-print)
- DRY=1
- ;;
---dry-run)
- DRY=1
- ;;
-esac
-
-if [[ "$DRY" -eq 1 ]]; then
- echo 'NOTE: Running in simulation mode'
- echo
-fi
-
-
-function cleanup_snapshots {
- ## Harvest days
- LIST_OF_DAYS=
- for i in ????-??-?? ; do
- LIST_OF_DAYS="$LIST_OF_DAYS $i";
- done
- SORTED_DAYS=`echo ${LIST_OF_DAYS} | sed -r 's/ /\n/g' | sort | uniq`
- DAY_COUNT=`echo $SORTED_DAYS | wc -w`
- if [[ $DAY_COUNT < 1 ]]; then
- echo "No files deleted"
- exit 0
- fi
-
- ## Select days to delete
- DELETE_COUNT=$((DAY_COUNT - KEEP_COUNT))
- if [[ "${DELETE_COUNT}" -lt 1 ]]; then
- echo "No files deleted"
- return
- fi
- if [[ "${DELETE_COUNT}" -gt "${DAY_COUNT}" ]]; then
- DELETE_COUNT="${DAY_COUNT}"
- fi
- DELETE_DAYS=`echo ${SORTED_DAYS} | sed -r 's/ /\n/g' | head -n $DELETE_COUNT`
- echo "Deleting ${DELETE_COUNT} of ${DAY_COUNT} days"
-
- ## Delete days
- COUNTER=1
- for PRETTY_DAY in ${DELETE_DAYS} ; do
- echo "Day ${PRETTY_DAY} [${COUNTER}/${DELETE_COUNT}]"
- for j in ${PRETTY_DAY}/qtcreator-*-????????????-* ; do
- if [[ ! -f ${j} ]]; then
- continue
- fi
-
- echo " ${j}"
- if [[ "$DRY" -eq 0 ]]; then
- ## Note: prefix for extra safety
- rm "../snapshots/${j}"
- fi
- done
- if [[ "$DRY" -eq 0 ]]; then
- ## Note: prefix for extra safety
- rmdir "../snapshots/${PRETTY_DAY}"
- fi
- COUNTER=$((COUNTER + 1))
- done
-}
-
-
-cleanup_snapshots
-exit 0
-
-
-## Properly close subshell
-)
-exit $?
diff --git a/scripts/snapshots/create_nullbyte_snapshots.sh b/scripts/snapshots/create_nullbyte_snapshots.sh
deleted file mode 100755
index 33af90ead1..0000000000
--- a/scripts/snapshots/create_nullbyte_snapshots.sh
+++ /dev/null
@@ -1,58 +0,0 @@
-#!/usr/bin/env bash
-
-## Open script-dir-homed subshell
-(
-ABS_SCRIPT_DIR=`pwd`/`dirname "$0"`
-cd "${ABS_SCRIPT_DIR}"
-
-
-print_run() {
- echo "$@"
- "$@"
-}
-
-rand_range() {
- incMin=$1
- incMax=$2
- echo $((RANDOM*(incMax-incMin+1)/32768+incMin))
-}
-
-rand_range_list() {
- for ((i=0;i<$3;++i)); do
- rand_range $1 $2
- done
-}
-
-
-identifiers="\
-linux-x86-setup.bin \
-linux-x86_64-setup.bin \
-linux-x86-gcc3.3-setup.bin \
-mac-setup.dmg \
-windows-setup.exe \
-"
-
-hour=23
-minutes=59
-
-for version in 0.9 ; do
-for year in $(rand_range 2007 2008) ; do
-for month in $(rand_range_list 1 12 3) ; do
-for day in $(rand_range_list 1 28 10) ; do
- dir=`printf '%04d-%02d-%02d' ${year} ${month} ${day}`
- print_run mkdir -p ${dir}
- timestamp=`printf '%04d%02d%02d%02d%02d' ${year} ${month} ${day} ${hour} ${minutes}`
- shared="qtcreator-${version}-${timestamp}"
- for i in ${identifiers} ; do
- print_run touch "${dir}/${shared}-${i}"
- done
-done
-done
-done
-done
-exit 0
-
-
-## Properly close subshell
-)
-exit $?