summaryrefslogtreecommitdiffstats
path: root/plugins/org.yocto.remote.utils/resources/ust_tar.sh
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.yocto.remote.utils/resources/ust_tar.sh')
-rwxr-xr-xplugins/org.yocto.remote.utils/resources/ust_tar.sh19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugins/org.yocto.remote.utils/resources/ust_tar.sh b/plugins/org.yocto.remote.utils/resources/ust_tar.sh
new file mode 100755
index 0000000..20a8039
--- /dev/null
+++ b/plugins/org.yocto.remote.utils/resources/ust_tar.sh
@@ -0,0 +1,19 @@
1#!/bin/sh
2
3#set PATH to include sbin dirs
4export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin"
5
6if [ ! -d "$@" ] || [ -z "$@" ]; then
7 exit 1
8fi
9
10DATESTRING="$(date +%Y%m%d%H%M%S%N)"
11BASENAME=`basename $@`
12DATAFILE=/tmp/${BASENAME}-${DATESTRING}.tar
13cd $@
14cd ..
15
16tar -cf ${DATAFILE} ${BASENAME} &> /dev/null || exit $?
17
18echo -e "ustfile:$DATAFILE\n"
19