stonet2000 commited on
Commit
b284fed
·
1 Parent(s): f5762eb

fix zip structures

Browse files
demos/AnymalC-Reach-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:52ac61af07a3702a4d00fe78c3e6fb51cfc84f916afc5348256338bc6c0477ec
3
- size 38479800
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04aeddc9549ca9505ce43d59e0e40db73e9db5360afd4acd4b346394765302c2
3
+ size 38479728
demos/LiftPegUpright-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:76d011ccda5cd3c3e47c5a40e6624d3cd5f5afe1df383194bf44a66633f7d95b
3
- size 14941849
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c176309b3a5d87e4f8650bbe5962fe54972c934899d5c5b02dcd5c8e0abaf74
3
+ size 14941729
demos/PegInsertionSide-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:af60bc6437201abf55da4577fc745df3a4f09a212e6f455936b9cb6b0eafa49a
3
  size 29047873
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f6200130383d6767ea734a4ddeb072b6b271b45765653afef7654a065630352a
3
  size 29047873
demos/PickCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:e2dc3a4db4ff69d68ca31d4772af232278b3abef99b3cdc73f7fc3cc8cb3eacd
3
- size 36589854
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16fb0398d96c9d91f487efec7e1267973ad0fc61567925a0f3fc4ae101eb163b
3
+ size 36589590
demos/PlugCharger-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a621cfde6657dcab38d56325464277b83bf42157f85d634b60f73ca95f829254
3
  size 24303422
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0ee94e08b1c88425af7b71eaeb1fb0e5e8c6ae0f3f14936aa53b7c6926e5403
3
  size 24303422
demos/PokeCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:d92481746dcdaa6d786de1b377d9331c4250e333233859cc7170721f00346549
3
- size 22891694
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:16018651807cf208214752049d45a6f263a2c006233830360c37859dd0bcbc0a
3
+ size 22891526
demos/PullCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1459766e74bd466478ff07230f61347693e8a8b22c7283ed5db9e04aa1cf1786
3
- size 11142653
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3699be28d8de783073ecc491fdd49ddd82383cbeae64081af0b82c343b80d2ac
3
+ size 11142485
demos/PullCubeTool-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:fe4494e952871f02980c255e9c839a2bf9bc8e85fce58e292e4b18e710c81ede
3
- size 41184723
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7c5077f5894d7f1fde1558141d7d287994005358a08662174f0f2fee99c0efcb
3
+ size 41261124
demos/PushCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cc2a7bab60c358592a8b5c95f7d3156a81ec7a99290d0865bb92b6fb30d0d056
3
- size 24574863
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:67eb3472f134573627f262d30ff13755a5034ea27d4b5767e4c2eaa124c3054a
3
+ size 24574647
demos/PushT-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:434d8ad2c4df635307e53b2e474aeb49f0c303e65d3fcfd5b4b4a6cd111cb080
3
- size 35715951
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:62da0b022d9dd012e9fa469ad645aac287e17320e266d7c3607a0d947cb4548f
3
+ size 35715783
demos/RollBall-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1ed74a021d3e83cf48d9d842bd9464619f598c79d91b72e1f25703e6e17730ec
3
- size 16732055
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8b2f16092238ba5014f1e1a1de635e7931d756b6b1c3586029a4db2b6d1ffe35
3
+ size 16731887
demos/StackCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8770bdbfc6206e70225b87d9029b99c5f801d8897be004d813be565bfcd403d7
3
- size 43486432
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c39dca1963bca0031eec7c608362cb8ca05fac2ac517344c71a277314843dcce
3
+ size 43486216
demos/TwoRobotPickCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:ee533d20c7163e065bbcdaa4b5154d23903e053832b8eab17d6cc30140eac2bd
3
- size 25813835
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:91eda7e3d3f0a1e0c41ee0cc2df92c779ff3d9916c53aec0856044ea7fb8f9ce
3
+ size 25813763
demos/TwoRobotStackCube-v1.zip CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:cd820a509f9880d9ce8d8ebaeee6afed09704f68499ba991852508f1f2b68848
3
- size 28190232
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5b611321eb7e72bb346ea2c1d0f44e45d571fca2d2a520687a25c03107eab027
3
+ size 28190160
hooks/zip_modified_demos.sh CHANGED
@@ -7,25 +7,31 @@ changed_files=$(git diff --cached --name-only)
7
  any_changes=false
8
 
9
  # Check each demo folder and rezip if changes detected
10
- for folder in demos/*; do
11
- # Remove trailing slash
12
- folder=${folder%/}
 
 
 
 
 
 
13
  echo $folder
14
  # Check if any changed files are in this folder
15
- if echo "$changed_files" | grep -q "^$folder/"; then
16
- echo "Changes detected in $folder, rezipping..."
17
-
18
- # Remove existing zip if it exists
19
- rm -f "$folder.zip"
20
-
21
- # Create new zip archive
22
- zip -r "$folder.zip" "$folder"
23
-
24
- # Stage the new zip file
25
- git add "$folder.zip"
26
-
27
- any_changes=true
28
- fi
29
  done
30
 
31
  if [ "$any_changes" = false ]; then
 
7
  any_changes=false
8
 
9
  # Check each demo folder and rezip if changes detected
10
+ # Get the git root directory
11
+ root_dir=$(git rev-parse --show-toplevel)
12
+
13
+ # Change to the demos directory relative to root
14
+ cd "$root_dir/demos"
15
+
16
+ for folder in ./*; do
17
+ # Remove trailing slash and demos/ prefix
18
+ folder=${folder#demos/}
19
  echo $folder
20
  # Check if any changed files are in this folder
21
+ # if echo "$changed_files" | grep -q "^$folder/"; then
22
+ echo "Changes detected in $folder, rezipping..."
23
+
24
+ # Remove existing zip if it exists
25
+ rm -f "$folder.zip"
26
+
27
+ # Create new zip archive
28
+ zip -r "$folder.zip" "$folder"
29
+
30
+ # Stage the new zip file
31
+ git add "$folder.zip"
32
+
33
+ any_changes=true
34
+ # fi
35
  done
36
 
37
  if [ "$any_changes" = false ]; then