From 518dd0dd953f30754123d8e49ecefd864dc702e1 Mon Sep 17 00:00:00 2001 From: iory Date: Thu, 4 Aug 2022 00:04:03 +0900 Subject: [PATCH] [jsk_unitree_startup/cross] Add compress command --- jsk_unitree_robot/cross/Makefile | 3 +++ jsk_unitree_robot/cross/compress.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100755 jsk_unitree_robot/cross/compress.sh diff --git a/jsk_unitree_robot/cross/Makefile b/jsk_unitree_robot/cross/Makefile index e942246cf6..7a05f06953 100644 --- a/jsk_unitree_robot/cross/Makefile +++ b/jsk_unitree_robot/cross/Makefile @@ -20,6 +20,9 @@ user: install: ./install.sh +compress: + ./compress.sh + clean: rm -fr ${TARGET_MACHINE}_ws_* diff --git a/jsk_unitree_robot/cross/compress.sh b/jsk_unitree_robot/cross/compress.sh new file mode 100755 index 0000000000..e506ab71d8 --- /dev/null +++ b/jsk_unitree_robot/cross/compress.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +if [ -e "arm64v8_User" ]; then + if [ -e "arm64v8_User.tgz" ]; then + echo "WARNING: Compressed arm64v8_User.tgz is found." + read -p "WARNING: Are you sure to continue [y/N] ? " -n 1 -r + echo # (optional) move to a new line + if [[ $REPLY =~ ^[Yy]$ ]]; then + tar -zcvf arm64v8_User.tgz arm64v8_User + fi + else + tar -zcvf arm64v8_User.tgz arm64v8_User + fi +fi + +if [ -e "arm64v8_System" ]; then + if [ -e "arm64v8_System.tgz" ]; then + echo "WARNING: Compressed arm64v8_System.tgz is found." + read -p "WARNING: Are you sure to continue [y/N] ? " -n 1 -r + echo # (optional) move to a new line + if [[ $REPLY =~ ^[Yy]$ ]]; then + chmod 644 arm64v8_System/ros1_inst/share/pr2eus/*.l + tar -zcvf arm64v8_System.tgz arm64v8_System + fi + else + chmod 644 arm64v8_System/ros1_inst/share/pr2eus/*.l + tar -zcvf arm64v8_System.tgz arm64v8_System + fi +fi