Added automatisation script build_bundle.zsh, which strips unwanted features fron .nb files and also packs everything into tag.gz archive
This commit is contained in:
parent
eeb9c31455
commit
42db7fd9ce
5 changed files with 37 additions and 2 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
./automation/bundle.tar.gz
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
RowBox[{"x", "=",
|
||||
RowBox[{"Plot", "[",
|
||||
36
automation/build_bundle.zsh
Executable file
36
automation/build_bundle.zsh
Executable file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/zsh
|
||||
|
||||
BOLD='\033[1m'
|
||||
REGULAR='\033[0m'
|
||||
|
||||
target_dir="Pu240_798-811_TitovAA"
|
||||
|
||||
target_path=$(find ../ -type d -name "$target_dir" -print -quit)
|
||||
read -r "USER_AGREE?%B$target_path%b will be used as bundle source [Y/n]: "
|
||||
|
||||
USER_AGREE="${USER_AGREE:l}"
|
||||
|
||||
if [[ "$USER_AGREE" == "q" ]]; then
|
||||
print "Bundle\'s making canceled"
|
||||
exit
|
||||
fi
|
||||
|
||||
if ! [[ -z "$USER_AGREE" || "$USER_AGREE" == "y" || "$USER_AGREE" == "yes" ]]; then
|
||||
read -r "target_path?Enter path to bundle source: "
|
||||
fi
|
||||
|
||||
dirname="${target_path:A:t}"
|
||||
tmp_dir=$(mktemp -d /tmp/XXXXX)
|
||||
#tmp_dir="/tmp/bundle"
|
||||
cp -r "$target_path" "$tmp_dir"
|
||||
|
||||
for dir in "$tmp_dir/$dirname"/*(/); do
|
||||
find "$dir" -type f -iname "rename*" -exec rm -f {} \;
|
||||
/usr/bin/env python ./clean_wolfram_notebook.py "$dir"/* --in-place
|
||||
done
|
||||
|
||||
find "$tmp_dir" -type f -iname "*.bak" -exec rm -f {} \;
|
||||
|
||||
tar -cvzf bundle.tar.gz -C "$tmp_dir" "$dirname"
|
||||
|
||||
rm -rf "$tmp_dir"
|
||||
BIN
automation/bundle.tar.gz
Normal file
BIN
automation/bundle.tar.gz
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue