diff options
author | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:49:30 +0200 |
---|---|---|
committer | Tudor Florea <tudor.florea@enea.com> | 2014-10-10 03:49:30 +0200 |
commit | ede215cf93ba81c963ae62d665d0f32c9407551c (patch) | |
tree | 4a6dc80f259bccb8ff8b76d31e6cc8794bd97a2b /plugins/org.yocto.remote.utils/resources/ust_tar.sh | |
download | eclipse-poky-kepler-ede215cf93ba81c963ae62d665d0f32c9407551c.tar.gz |
initial commit for Enea Linux 4.0-140929daisy-140929
Migrated from the internal git server on the daisy-enea-point-release branch
Signed-off-by: Tudor Florea <tudor.florea@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 | |||