summaryrefslogtreecommitdiff
path: root/tsp/scripts
diff options
context:
space:
mode:
authorAleksander Mistewicz <a.mistewicz@samsung.com>2016-05-06 11:22:49 +0200
committerAleksander Mistewicz <a.mistewicz@samsung.com>2016-06-23 17:05:14 +0200
commit76ebf187a46341dcde24205033dd8052f0a3809b (patch)
tree63535aaaaec4645773a4ccdc2c89cd457b8f65d9 /tsp/scripts
parenta5b7192f6666794997cc67d6641951f757d31887 (diff)
downloadmajor-76ebf187a46341dcde24205033dd8052f0a3809b.tar.gz
major-76ebf187a46341dcde24205033dd8052f0a3809b.tar.bz2
major-76ebf187a46341dcde24205033dd8052f0a3809b.zip
Add tsp/scripts/free_diskspace.sh
Change-Id: Iae5463f09e9c20d118c456ee4c7b85fc6ae1da86 Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/scripts')
-rwxr-xr-xtsp/scripts/free_diskspace.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/tsp/scripts/free_diskspace.sh b/tsp/scripts/free_diskspace.sh
new file mode 100755
index 0000000..88ff2ed
--- /dev/null
+++ b/tsp/scripts/free_diskspace.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Author: Aleksander Mistewicz <a.mistewicz@samsung.com>
+
+# Assume that most of the space is taken up by downloaded images.
+# Delete ones that were modified at least 3 days ago.
+for i in $(find "${HOME}/ws/dwn" -type d -mtime +2)
+do
+ rm -vr "$i"
+done