fix(joz): Move bin files to own dir

This commit is contained in:
2025-09-11 10:14:31 +02:00
parent 79f2aa03cd
commit 20ae8555e3
23 changed files with 0 additions and 138 deletions

View File

@@ -1,11 +0,0 @@
#!/usr/bin/expect -f
eval spawn $argv
set timeout -1
match_max 100000
expect "*?assword:*"
puts "\nAutofill password..."
send -- "$env(BTG_PASSWORD)\r"
sleep 0.3
send -- "su\r"
send -- "cd /media/ram\r"
interact

View File

@@ -1,12 +0,0 @@
#!/usr/bin/expect -f
eval spawn $argv
set timeout -1
match_max 100000
expect "*?assword:*"
puts "\nAutofill password..."
send -- "$env(BTG_PASSWORD)\r"
expect eof
set return_code [wait]
exit [lindex $return_code 3]

View File

@@ -1,14 +0,0 @@
#!/usr/bin/expect -f
eval spawn $argv
set timeout -1
match_max 100000
expect "*?assword:*"
puts "\nAutofill password..."
send -- "$env(BTG_PASSWORD)\r"
sleep 0.3
send -- "su\r"
send -- "/etc/init.d/crond stop\r"
send -- "/etc/init.d/jozagv stop\r"
send -- "killall -9 jozagv\r"
send -- "/media/ram/jozagv\r"
interact

View File

@@ -1 +0,0 @@
~/.local/bin/.expect-btg-login ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no btg@$BTG_IP

View File

@@ -1 +0,0 @@
btg-scp btg@$BTG_IP:$@ .

View File

@@ -1 +0,0 @@
btg-scp btg@$BTG_IP:/usr/share/joz/jozdb.sqlite3 .

View File

@@ -1,11 +0,0 @@
out_dir=$(date +'full_%Y_%m_%d__%H_%M_%S')
mkdir $out_dir
cd $out_dir
# Download logs
btg-scp -r btg@$BTG_IP:/joz/agv/logs .
btg-download-jozagv
btg-download-map
btg-download-database

View File

@@ -1 +0,0 @@
btg-scp btg@$BTG_IP:/joz/agv/jozagv .

View File

@@ -1,2 +0,0 @@
logs_dir=$(date +'logs_%Y_%m_%d__%H_%M_%S')
btg-scp -r btg@$BTG_IP:/joz/agv/logs $logs_dir

View File

@@ -1 +0,0 @@
btg-scp btg@$BTG_IP:/etc/joz/*.xml .

View File

@@ -1 +0,0 @@
btg-download /media/ram/$@ .

View File

@@ -1,26 +0,0 @@
mount_folder=/mnt/btg
.enable_sshfs_user_allow_other.sh
if [[ ! $(sudo echo 0) ]]; then exit; fi
if mountpoint -q $mount_folder
then
echo "Mount point $mount_folder is already mounted, to unmount call 'umount $mount_folder'"
exit 0
fi
sudo mkdir -p $mount_folder
sudo chmod 777 $mount_folder
#Execute the sshfs command using the expect script
sshfs -o allow_other -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o password_stdin btg@$BTG_IP:/ $mount_folder <<< $BTG_PASSWORD
retval=$?
# Check if retval is zero
if [ $retval -eq 0 ]; then
echo "Successfully mounted to $mount_folder"
else
echo "Error: command failed with return code $retval"
exit $retval
fi

View File

@@ -1 +0,0 @@
ping $BTG_IP

View File

@@ -1,33 +0,0 @@
#Execute the scp command using the expect script
~/.local/bin/.expect-btg-pass scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $@
#get result
retval=$?
# Define error code messages
case $retval in
0)
echo "Upload/Download Successfull!"
;;
1)
echo "Invalid command line argument"
;;
2)
echo "Conflicting arguments given"
;;
3)
echo "General runtime error"
;;
4)
echo "Unrecognized response from ssh (parse error)"
;;
5)
echo "Invalid/incorrect password"
;;
6)
echo "Host public key is unknown. sshpass exits without confirming the new key."
;;
*)
echo "Unknown error code: $retval"
;;
esac

View File

@@ -1,2 +0,0 @@
btg-upload-jozagv
~/bin/.expect-btg-test-jozagv ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no btg@$BTG_IP

View File

@@ -1 +0,0 @@
btg-scp $@ btg@$BTG_IP:/usr/share/joz/jozdb.sqlite3

View File

@@ -1,4 +0,0 @@
JOZAGV_PATH=$JOZ_PATH/jozagv/build/JOZ_Robot_Controller_SDK/MinSizeRel/jozagv
btg-upload-jozagv-configs
btg-upload-jozagv-release

View File

@@ -1 +0,0 @@
btg-scp -r $JOZ_PATH/jozagv/config/* btg@$BTG_IP:/etc/joz

View File

@@ -1,5 +0,0 @@
JOZAGV_PATH=$JOZ_PATH/jozagv/build/JOZ_Robot_Controller_SDK/Debug/jozagv
btg-upload-jozagv-configs
echo "Upload jozagv with modification date: $(stat -c '%y' $JOZAGV_PATH)"
btg-scp-ram $JOZAGV_PATH

View File

@@ -1,4 +0,0 @@
JOZAGV_PATH=$JOZ_PATH/jozagv/build/JOZ_Robot_Controller_SDK/MinSizeRel/jozagv
echo "Upload jozagv with modification date: $(stat -c '%y' $JOZAGV_PATH)"
btg-upload-ram $JOZAGV_PATH

View File

@@ -1 +0,0 @@
btg-scp $@ btg@$BTG_IP:/etc/joz/map.xml

View File

@@ -1 +0,0 @@
btg-scp $@ btg@$BTG_IP:/media/ram

View File

@@ -1,3 +0,0 @@
newest_build_file=$(ls -td $JOZ_PATH/remote/build/joz/*/* | head -1)
newest_build_dir=$(dirname ${newest_build_file})
btg-scp $newest_build_dir/language.bin $newest_build_dir/version $newest_build_dir/firmware.bin btg@$BTG_IP:/etc/joz/remote/0