diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 13:36:50 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 15:25:03 +0100 |
commit | 41ac47d732eed8392d60d0f6773e5a279d49b999 (patch) | |
tree | cf19d099db9cfdb8d73aa21c31e7aa1cc86ff860 /plugins/org.yocto.remote.utils/resources/ust_tar.sh | |
download | eclipse-poky-juno-41ac47d732eed8392d60d0f6773e5a279d49b999.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'plugins/org.yocto.remote.utils/resources/ust_tar.sh')
-rwxr-xr-x | plugins/org.yocto.remote.utils/resources/ust_tar.sh | 19 |
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 | ||
4 | export PATH="$PATH:/usr/local/sbin:/usr/sbin:/sbin" | ||
5 | |||
6 | if [ ! -d "$@" ] || [ -z "$@" ]; then | ||
7 | exit 1 | ||
8 | fi | ||
9 | |||
10 | DATESTRING="$(date +%Y%m%d%H%M%S%N)" | ||
11 | BASENAME=`basename $@` | ||
12 | DATAFILE=/tmp/${BASENAME}-${DATESTRING}.tar | ||
13 | cd $@ | ||
14 | cd .. | ||
15 | |||
16 | tar -cf ${DATAFILE} ${BASENAME} &> /dev/null || exit $? | ||
17 | |||
18 | echo -e "ustfile:$DATAFILE\n" | ||
19 | |||