Comment: | fossil download script update 2 |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
9b836f32e23ade54c62daccede456990 |
User & Date: | martin_vahi on 2016-08-16 05:15:23 |
Other Links: | manifest | tags |
2016-08-20 07:49 | Silktorrent propaganda leaflet check-in: 56f9b20300 user: martin_vahi tags: trunk | |
2016-08-16 05:15 | fossil download script update 2 check-in: 9b836f32e2 user: martin_vahi tags: trunk | |
2016-08-16 05:02 | fossil download script update check-in: b199651992 user: martin_vahi tags: trunk | |
Added COMMENTS.txt version [fa3c2fb228].
> > > > > > > > |
1 2 3 4 5 6 7 8 |
The latest milestone releases of the Silktorrent are published as part of the mmmv_devel_tools http://technology.softf1.com/mmmv_devel_tools/ |
Added milestone_releases/2016_06_24_Silktorrent/README.md version [0143b10a32].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# Silktorrent --------------------------------------------------------------------------- The current version of the Silktorrent is **INCOMPLETE** and **VERY EXPERIMENTAL**. Up to date Silktorrent documentation **MIGHT** resides at [silktorrent.ch](http://www.silktorrent.ch). The Silktorrent is meant to be a doomsday last resort network software infrastructure that allows to create reliable information systems that can withstand a situation, where Police/adversaries have taken down literally all servers of the authors of the censored files and, at the same time, have access to all of the encryption keys of the authors of the censored files and, at the same time, have taken down internet connections of the general public. --------------------------------------------------------------------------- ## The Ideas that are used in this Version This version of the Silktorrent is based on the idea that **tar-files can be named according to their secure hash and size**. Applications that use the Silktorrent system for "networking", write and read the tar-files from some local folder and that folder is then filled with or emptied from tar-files by some Silktorrent "P2P agent". In the simplest case the "P2P agent" can be literally a human, who copies tar-files between a USB-stick and the local folder, but in practice there can be more automated solutions. Due to the fact that the names of the tar-files contain their size and secure hash, it does not matter, which foes help to transport the files. From Silktorrent architecture point of view, it is perfectly OK for the NSA to offer a Dropbox service to privacy advocates, as long as the timing and location based metadata is hidden from the NSA. Redundancy is achieved by just having a copy of a collection of the tar-files at multiple locations. It's a lot like the software package collections of various Linux distributions. The path, how the software packages reach the computer, copied from a DVD, downloaded from a local server, etc. does not matter. The tar-files can be delivered by pigeons that have memory cards attached to their feet, mail-drones, commuters, who just pick up and dump files through their cellphone WiFi, etc. **Silktorrent e-mail or an instant messaging service can be implemented by saving extra records to a separate database, where there is a relation between the tar-file name, recipient ID and suggested-deletion-date.** Counter-measures for Denial-of-Service attacks are based on authentication, timing, location(channel). One of the core ideas of the Silktorrent is that the Silktorrent applications must assume that the location of the tar-file can not be concluded from its name. Silktorrent applications ask for tar-files from agents, who might not have the requested tar-file available and the agents might not even be able to retrieve the requested tar-file. The agents are free to use whatever [crazy](http://longterm.softf1.com/specifications/lightmsgp/v2/) addressing scheme that they want. --------------------------------------------------------------------------- ## Further Censorship Countermeasures In practice a relatively short fixed width string, for example, a [GUID](http://longterm.softf1.com/specifications/third_party/ietf/mmmv_highlighted_RFCs/RFC_00004122_GUID_spec.txt) can be searched from a database table in a fraction of a second. Even the [SQLite](https://www.sqlite.org/) database engine is that fast. That makes it feasible for people to use a set of one-time ID-s, user-names, with every person that they exchange Silktorrent based e-mails with. An e-mail server tells an e-mail client that it has a set of encrypted blobs that are addressed to Joe, Micky, Jill, Jack and it's up to You to figure out, which one You are. Each e-mail has a suggested-deletion-date attached to it, either in the tar-file, which contains folders * payload * header or the e-mail client, which gave the tar-file to the e-mail server, told the e-mail server the suggested-deletion-date. The header contains a file named ./silktorrent_salt.txt which probabilistically guarantees that the size and bit-stream of the payload can not be fully deduced from the tar-file name, forcing censoring parties to download a considerable amount of tar-files that they do not need. --------------------------------------------------------------------------- ## The Silktorrent is Licensed Under the MIT License The MIT license from the http://www.opensource.org/licenses/mit-license.php Copyright 2016, martin.vahi@softf1.com that has an Estonian personal identification code of 38108050020. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --------------------------------------------------------------------------- |
Added milestone_releases/2016_06_24_Silktorrent/doc/COMMENTS.txt version [13686783ef].
> > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
You may want find out, whether more up to date documentation is available from the http://www.silktorrent.ch The ./clone_of_the_public_regions_of_the_Fossil_repository is likely to be a waste of Your time. It exists only to make at least something available, if the online version is not available or has been compromised in some relevant manner. The ./clone_of_the_public_regions_of_the_Fossil_repository/mmmv_Fossil_operator_t1.bash is a convenience script, a wrapper to the Fossil. It requires Bash and has been properly tested only on Linux. If it is executed without any arguments, it displays a help message that describes the possible arguments. |
Added milestone_releases/2016_06_24_Silktorrent/doc/clone_of_the_public_regions_of_the_Fossil_repository/fossil-src-1.34.tar.gz version [38e2a26b1e].
cannot compute difference between binary files
Added milestone_releases/2016_06_24_Silktorrent/doc/clone_of_the_public_regions_of_the_Fossil_repository/mmmv_Fossil_operator_t1.bash version [5bfcf24cc9].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
#!/usr/bin/env bash # Initial author: Martin.Vahi@softf1.com # This file is in the public domain. #========================================================================== S_FP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" S_FP_ORIG="`pwd`" S_TIMESTAMP="`date +%Y`_`date +%m`_`date +%d`_T_`date +%H`h_`date +%M`min_`date +%S`s" fun_assert_exists_on_path_t1 () { local S_NAME_OF_THE_EXECUTABLE=$1 # first function argument local S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} if [ "$S_TMP_1" == "" ] ; then echo "" echo "This bash script requires the \"$S_NAME_OF_THE_EXECUTABLE\" to be on the PATH." echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # fun_assert_exists_on_path_t1 fun_assert_exists_on_path_t1 "file" # for checking MIME types fun_assert_exists_on_path_t1 "find" # for recursing fun_assert_exists_on_path_t1 "fossil" # tested with v1.34 fun_assert_exists_on_path_t1 "gawk" fun_assert_exists_on_path_t1 "grep" fun_assert_exists_on_path_t1 "cat" fun_assert_exists_on_path_t1 "ruby" # anything over/equal v.2.1 will probably do fun_assert_exists_on_path_t1 "shred" # for secure delete fun_assert_exists_on_path_t1 "uname" # to check the OS type fun_assert_exists_on_path_t1 "uuidgen" # needed for generating tmp file names fun_assert_exists_on_path_t1 "xargs" # find . -name '*' | xargs blabla #-------------------------------------------------------------------------- S_TMP_0="`uname -a | grep -E [Ll]inux`" if [ "$S_TMP_0" == "" ]; then echo "" echo " The classical command line utilities at " echo " different operating systems, for example, Linux and BSD," echo " differ. This script is designed to run only on Linux." echo " If You are willing to risk that some of Your data " echo " is deleted and/or Your operating system instance" echo " becomes permanently flawed, to the point that " echo " it will not even boot, then You may edit the Bash script that " echo " displays this error message by modifying the test that " echo " checks for the operating system type." echo "" echo " If You do decide to edit this Bash script, then " echo " a recommendation is to test Your modifications " echo " within a virtual machine or, if virtual machines are not" echo " an option, as some new operating system user that does not have " echo " any access to the vital data/files." echo " GUID=='10b1e716-b716-4be1-950e-60c2018160e7'" echo "" echo " Aborting script without doing anything." echo "" exit 1 # exit with error fi #-------------------------------------------------------------------------- S_TMP_0="" S_ACTIVITY_OF_THIS_SCRIPT=$1 S_URL_REMOTE_REPOSITORY="" SB_EXIT_WITH_ERROR="f" # needed for scriptability S_ARGNAME_ACTIVITY_SHRED_ARG_2="do_not_prompt_for_confirmation" fun_print_msg_t1() { echo "" echo "The second console argument " echo "is expected to be the URL of the remote repository." } # fun_print_msg_t1 fun_exit_without_any_errors_t1() { local X_SKIP_MESSAGE="$1" if [ "$X_SKIP_MESSAGE" == "" ]; then echo "" echo "Aborting script without doing anything." echo "" fi #---- cd $S_FP_ORIG exit 0 } # fun_exit_without_any_errors_t1 #-------------------------------------------------------------------------- # Activity aliases for comfort. if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "up" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_remote_with_local" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "upload" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_remote_with_local" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "ci" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_remote_with_local" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "down" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_local_with_remote" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "download" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_local_with_remote" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "co" ]; then S_ACTIVITY_OF_THIS_SCRIPT="clone_all" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "?" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-?" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "--help" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-help" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "rm" ]; then S_ACTIVITY_OF_THIS_SCRIPT="shred_local_copy" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "del" ]; then S_ACTIVITY_OF_THIS_SCRIPT="shred_local_copy" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "delete" ]; then S_ACTIVITY_OF_THIS_SCRIPT="shred_local_copy" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "info" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "--info" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-info" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "--about" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-about" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi #-------- #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "about" ]; then echo "" echo " The initial version of this script has been written by " echo " Martin.Vahi@softf1.com " echo " in 2016_02. The initial version is in public domain." echo " The command \"help\" offers more information. " echo "" echo " Thank You for using this script :-)" echo "" echo "" fun_exit_without_any_errors_t1 "t" fi #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "exit" ]; then fun_exit_without_any_errors_t1 else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_all" ]; then if [ "$2" == "" ]; then fun_print_msg_t1 S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" else S_URL_REMOTE_REPOSITORY="$2" fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_public" ]; then if [ "$2" == "" ]; then fun_print_msg_t1 S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" else S_URL_REMOTE_REPOSITORY="$2" fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" != "overwrite_local_with_remote" ]; then if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "overwrite_remote_with_local" ]; then if [ "$2" != "" ]; then if [ "$2" == "use_autogenerated_commit_message" ]; then if [ "$3" != "" ]; then echo "" echo "If the first console argument is \"overwrite_local_with_remote\" and" echo "the second console argument is \"use_autogenerated_commit_message\", " echo "then there should not be a 3. console argument." echo "GUID=='94e31fd3-85c9-4dfb-a2fd-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi else if [ "$2" == "read_commit_message_from_file" ]; then S_FP_MESSAGE_FILE_CANDIDATE="$3" # file path candidate if [ "$S_FP_MESSAGE_FILE_CANDIDATE" == "" ]; then echo "" echo "If the first console argument is " echo "\"overwrite_local_with_remote\" and" echo "the second console argument is " echo "\"read_commit_message_from_file\", " echo "then there should be also a 3. console argument " echo "that is expected to be a file path to a text file." echo "GUID=='adfce255-e3fe-40ae-84fd-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then if [ "$4" != "" ]; then echo "" echo "If the first console argument is " echo "\"overwrite_local_with_remote\" and" echo "the second console argument is " echo "\"read_commit_message_from_file\", " echo "then there should be exactly 3. console arguments, " echo "not 4 or more. Unfortunately the 4. argument is currently " echo "---citation--start---" echo "$4" echo "---citation--end-----" echo "GUID=='0b03ec37-da96-456e-b3fd-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then if [ ! -e "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then echo "" echo "The commit message file path candidate " echo "references either a missing file or " echo "a broken symlink." echo "GUID=='4c29c433-48e4-4ced-a4fd-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then if [ -d "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then echo "" echo "The commit message file path candidate " echo "references a folder, but it should " echo "reference a text file." echo "GUID=='fee26538-6bfb-4adb-b4fd-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then S_TMP_0="`filesize $S_FP_MESSAGE_FILE_CANDIDATE`" S_TMP_1="`ruby -e \"s_out='OK'; if (2000<$S_TMP_0) then s_out='too_big' end; print(s_out);\"`" if [ "$S_TMP_1" == "too_big" ]; then echo "" echo "The commit message file path " echo "references a file that has a size of $S_TMP_0 bytes." echo "The suspicion is that it is a wrong file. " echo "because a commit message is usually not that lengthy." echo "GUID=='b95f593c-5140-4506-84ed-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" else if [ "$S_TMP_0" == "0" ]; then echo "" echo "The commit message file path " echo "references a file that has a size of 0 (zero) bytes." echo "" echo "The generation of commit message files " echo "can be avoided by using the option " echo "" echo " \"use_autogenerated_commit_message\"" echo "" echo "in stead of the option " echo "" echo " \"read_commit_message_from_file\" ." echo "" echo "GUID=='31b2b6aa-10c1-4349-93ed-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then S_TMP_0="`file --mime-type $S_FP_MESSAGE_FILE_CANDIDATE | grep text `" if [ "$S_TMP_0" == "" ]; then echo "" echo "The commit message file path " echo "references a file that has a MIME type of " echo "" echo "`file --mime-type $S_FP_MESSAGE_FILE_CANDIDATE`" echo "" echo "The commit message file must be a text file and " echo "text files have the string \"text\" in their MIME type name." echo "GUID=='fc0cb22c-578d-47a2-92ed-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi fi # read_commit_message_from_file fi fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "shred_local_copy" ]; then if [ "$2" != "" ]; then # the 2. arg is optional here if [ "$2" != "$S_ARGNAME_ACTIVITY_SHRED_ARG_2" ]; then echo "" echo "If the first console argument is \"shred_local_copy\", then" echo "the second console argument is allowed to be only " echo "" echo " \"$S_ARGNAME_ACTIVITY_SHRED_ARG_2\", without quotation marks." echo "GUID=='1a618c55-ef9a-4a2f-aeed-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" != "print_script_version" ]; then if [ "$S_ACTIVITY_OF_THIS_SCRIPT" != "help" ]; then echo "" echo "The very first console argument " echo "of this script is expected to be " echo "a command that is specific to this script." echo "GUID=='a6728226-e43f-4baa-93ed-60c2018160e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi fi fi fi fi fi fi #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "help" ]; then echo "" echo "Possible console argument sets are:" echo "" echo " clone_all <remote repository url>" echo " clone_public <remote repository url>" echo " overwrite_local_with_remote" echo "" echo " overwrite_remote_with_local (use_autogenerated_commit_message)?" echo " overwrite_remote_with_local read_commit_message_from_file <path to a text file>" echo "" echo " shred_local_copy ($S_ARGNAME_ACTIVITY_SHRED_ARG_2)?" echo " help" echo " print_script_version" echo " exit # just for testing" echo "" #---- cd $S_FP_ORIG if [ "$SB_EXIT_WITH_ERROR" == "t" ]; then exit 1 # To let the parent script know that # the parent script calls this script with # flawed console argument values. else exit 0 fi fi #-------------------------------------------------------------------------- # The script version is needed by other scripts that depend on this script. # The script version GUID must not be surrounded by # any quote signs (',"), because otherwise the # version GUID will be overwritten by the UpGUID tool, # but unlike error message GUID-s this GUID must stay constant. # To allow the version to be used as sub-part of file names and # folder names, the version must not contain any spaces, line breaks # and other characters that have a special meaning in Bash. # # If the version ID did not match the GUID regex, then I would have to # write a long comment about it not being allowed to match the # GUID regex. :-D S_VERSION_OF_THIS_SCRIPT="c52b5919-3ea2-4ebd-94fd-60c2018160e7" if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "print_script_version" ]; then echo "The version of this script is: $S_VERSION_OF_THIS_SCRIPT" #---- cd $S_FP_ORIG exit 0 fi #-------------------------------------------------------------------------- S_FP_SANDBOX_DIRECTORY_NAME="sandbox_of_the_Fossil_repository" S_FP_SANDBOX="$S_FP_DIR/$S_FP_SANDBOX_DIRECTORY_NAME" #---- S_FP_ARCHIVES_DIRECTORY_NAME="archival_copies_of_the_Fossil_repository_sandbox" S_FP_ARCHIVES="$S_FP_DIR/$S_FP_ARCHIVES_DIRECTORY_NAME" S_FP_ARCHIVES_TS="$S_FP_ARCHIVES/v$S_TIMESTAMP" #---- S_FP_FOSSILFILE_NAME="repository_storage.fossil" S_FP_FOSSILFILE="$S_FP_DIR/$S_FP_FOSSILFILE_NAME" #-------- S_LC_NOT_DETERMINED="not determined" SB_SANDBOX_DIR_EXISTS="$S_LC_NOT_DETERMINED" fun_sandbox_folder_or_symlink_exists() { SB_SANDBOX_DIR_EXISTS="f" if [ ! -e $S_FP_SANDBOX ]; then # Does not exist or it is a broken symbolic link. SB_SANDBOX_DIR_EXISTS="f" else if [ -d $S_FP_SANDBOX ]; then SB_SANDBOX_DIR_EXISTS="t" fi fi } # fun_sandbox_folder_or_symlink_exists SB_FOSSILFILE_EXISTS="$S_LC_NOT_DETERMINED" fun_fossil_repository_file_or_symlink_exists() { SB_FOSSILFILE_EXISTS="t" if [ ! -e $S_FP_FOSSILFILE ]; then # Does not exist or it is a broken symbolic link. SB_FOSSILFILE_EXISTS="f" else if [ -d $S_FP_FOSSILFILE ]; then SB_FOSSILFILE_EXISTS="f" fi fi } # fun_fossil_repository_file_or_symlink_exists S_LC_NOT_DETERMINED="not determined" SB_ARCHIVE_DIR_EXISTS="$S_LC_NOT_DETERMINED" fun_archives_folder_or_symlink_exists() { SB_ARCHIVE_DIR_EXISTS="f" if [ ! -e $S_FP_ARCHIVES ]; then # Does not exist or it is a broken symbolic link. SB_ARCHIVE_DIR_EXISTS="f" else if [ -d $S_FP_ARCHIVES ]; then SB_ARCHIVE_DIR_EXISTS="t" fi fi } # fun_archives_folder_or_symlink_exists #-------- fun_fossil_repository_file_or_symlink_exists fun_sandbox_folder_or_symlink_exists fun_archives_folder_or_symlink_exists fun_assertion_t1() { local SB_CANDIDATE=$1 local SB_THROW="t" #---- if [ "$SB_CANDIDATE" == "t" ]; then SB_THROW="f" else if [ "$SB_CANDIDATE" == "f" ]; then SB_THROW="f" fi fi #---- if [ "$SB_THROW" == "t" ]; then echo "" echo "This Bash script is flawed. " echo "fun_assertion_t1() assertion failed." echo "GUID=='0e253639-885d-49b9-a4ed-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_assertion_t1 fun_assertion_t1 "$SB_FOSSILFILE_EXISTS" fun_assertion_t1 "$SB_SANDBOX_DIR_EXISTS" fun_assertion_t1 "$SB_ARCHIVE_DIR_EXISTS" #-------------------------------------------------------------------------- fun_assert_repository_local_copy_existence() { fun_fossil_repository_file_or_symlink_exists if [ "$SB_FOSSILFILE_EXISTS" == "f" ]; then echo "" echo "The directory " echo "`pwd`" echo "does not contain a Fossil repository file named " echo "" echo " $S_FP_FOSSILFILE_NAME" echo "" echo "Aborting script." echo "GUID=='9e259331-2604-424b-b2dd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi fun_sandbox_folder_or_symlink_exists if [ "$SB_SANDBOX_DIR_EXISTS" == "f" ]; then echo "" echo "The directory " echo "`pwd`" echo "does not contain a directory named " echo "" echo " $S_FP_SANDBOX_DIRECTORY_NAME" echo "" echo "Aborting script." echo "GUID=='bd274616-5c19-4da2-b3dd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_assert_repository_local_copy_existence fun_assert_the_lack_of_repository_local_copy_t1() { if [ "$SB_FOSSILFILE_EXISTS" == "t" ]; then echo "" echo "The directory " echo "`pwd`" echo "already contain a file named " echo "" echo " $S_FP_FOSSILFILE_NAME" echo "" echo "To avoid overwriting an existing local copy, this script is aborted" echo "and nothing is downloaded/uploaded by this script." echo "GUID=='e82ebd3b-eeec-4eaa-b5dd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$SB_SANDBOX_DIR_EXISTS" == "t" ]; then echo "" echo "The directory " echo "`pwd`" echo "already contains a directory named " echo "" echo " $S_FP_SANDBOX_DIRECTORY_NAME" echo "" echo "To avoid overwriting an existing local copy, this script is aborted" echo "and nothing is downloaded/uploaded by this script." echo "GUID=='12ece555-f0b7-4b68-91dd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_assert_the_lack_of_repository_local_copy_t1 fun_initialize_sandbox_t1() { mkdir -p $S_FP_SANDBOX sync; cd $S_FP_SANDBOX fossil open $S_FP_DIR/$S_FP_FOSSILFILE_NAME # full path for reliability fossil settings autosync off ; fossil settings case-sensitive TRUE ; fossil checkout --force --latest fossil pull fossil close sync; } # fun_initialize_sandbox_t1 #-------------------------------------------------------------------------- fun_last_minute_checks_t1() { # Last minute checks, just to be sure. local S_FP_FORBIDDEN_VALUE=$1 if [ "$S_FP_FORBIDDEN_VALUE" == "/" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='731d2a24-b82e-4703-b4dd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "$HOME" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='31c15b4f-e658-41c0-92dd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/home" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='b9f58420-e95a-488e-84cd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/root" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='40236327-50d4-45aa-83cd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/etc" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='d26ba631-c952-4f73-b4cd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/usr" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='398688e1-00d4-47b1-98cd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_last_minute_checks_t1 #-------------------------------------------------------------------------- SB_FOLDER_IS_EMPTY="$S_LC_NOT_DETERMINED" fun_folder_is_empty_t1() { local S_FP_FOLDER_TO_STUDY=$1 local S_FP_ORIG_LOCAL="`pwd`" #-------- SB_FOLDER_IS_EMPTY="t" local S_TMP_0="`cd $S_FP_FOLDER_TO_STUDY; ls -l | grep \"total 0\"`" if [ "$S_TMP_0" == "" ]; then SB_FOLDER_IS_EMPTY="f" fi #-------- cd $S_FP_ORIG_LOCAL # just in case } # fun_folder_is_empty_t1 fun_folder_is_empty_t1 "$S_FP_DIR" fun_assertion_t1 "$SB_FOLDER_IS_EMPTY" if [ "$SB_FOLDER_IS_EMPTY" == "t" ]; then echo "" echo "This Bash script is flawed. The " echo "$S_FP_DIR" echo "can not possibly be empty, because it contains " echo "at least one file, whcih is " echo "this very same Bash script that outputs the current error message." echo "GUID=='ca6dfb51-7279-415f-a1bd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi #-------------------------------------------------------------------------- fun_activity_core_overwrite_local_with_remote() { fun_assert_repository_local_copy_existence #-------- # The checks are party to cope with the `whoami`=="root" case. fun_last_minute_checks_t1 "$S_FP_SANDBOX" fun_last_minute_checks_t1 "$S_FP_ARCHIVES" fun_last_minute_checks_t1 "$S_FP_ARCHIVES_TS" #-------- chmod -f -R u+rx $S_FP_SANDBOX fun_folder_is_empty_t1 "$S_FP_SANDBOX" if [ "$SB_FOLDER_IS_EMPTY" == "f" ]; then # This if-statement is needed because the # cp -f -R AnEmptyDirectory/* ToSomewhere/ # gives an error. #---- mkdir -p $S_FP_ARCHIVES_TS #---- # The "chmod -f -R " is not used because it would # waste time on folders that are named by # the older $S_FP_ARCHIVES_TS values. chmod -f 0700 $S_FP_ARCHIVES chmod -f 0700 $S_FP_ARCHIVES_TS #---- # The separate cp and rm of the sandbox # contents is to somewhat retain the original # file premissions of the sandbox contents. cp -f -R $S_FP_SANDBOX/* $S_FP_ARCHIVES_TS/ fun_last_minute_checks_t1 "$S_FP_SANDBOX" chmod -f -R u+rwx $S_FP_SANDBOX rm -fr $S_FP_SANDBOX/* fi #-------- cd $S_FP_SANDBOX fossil open $S_FP_DIR/$S_FP_FOSSILFILE_NAME # full path for reliability fossil settings autosync off ; fossil checkout --force --latest fossil pull fossil close } # fun_activity_core_overwrite_local_with_remote if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "overwrite_local_with_remote" ]; then fun_activity_core_overwrite_local_with_remote #---- cd $S_FP_ORIG exit 0 fi # overwrite_local_with_remote #-------------------------------------------------------------------------- fossil close 2>/dev/null if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_public" ]; then fun_assert_the_lack_of_repository_local_copy_t1 cd $S_FP_DIR fossil clone $S_URL_REMOTE_REPOSITORY ./$S_FP_FOSSILFILE_NAME fun_initialize_sandbox_t1 cd $S_FP_ORIG #---- sync fun_activity_core_overwrite_local_with_remote cd $S_FP_ORIG sync #---- exit 0 fi # clone_public #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_all" ]; then fun_assert_the_lack_of_repository_local_copy_t1 cd $S_FP_DIR #-------- S_USERNAME="" while [ "$S_USERNAME" == "" ] do echo "" echo "Please enter a username: " S_USERNAME="`ruby -e \"s=gets.gsub(/[\n\r\s]/,'');print(s)\"`" S_URL="`export S_USERNAME=\"$S_USERNAME\"; S_URL=\"$S_URL_REMOTE_REPOSITORY\" ruby -e 's_0=ENV[\"S_URL\"].sub(\"http://\",\"http:/\").sub(\"http:/\",\"http://\"+ENV[\"S_USERNAME\"].to_s+\":nonsensepassword@\");print(s_0)'`" done #-------- fossil clone --private $S_URL ./$S_FP_FOSSILFILE_NAME fun_initialize_sandbox_t1 cd $S_FP_ORIG #---- sync fun_activity_core_overwrite_local_with_remote cd $S_FP_ORIG sync #---- exit 0 fi # clone_all #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "overwrite_remote_with_local" ]; then fun_assert_repository_local_copy_existence #-------- # It's important that this script will not try # to recursively copy/move the content of the "/" to # a subfolder of the "/", the "/tmp". # The other folders that are covered by the # test are a bit of an overkill here, may be even an # annoying and unjustified restrictions, but # in most cases those restrictions do not hurt either. fun_last_minute_checks_t1 "$S_FP_SANDBOX" #---- S_TMP_0="/tmp/tmp_mmmv_$S_VERSION_OF_THIS_SCRIPT" S_TMP_1="__" S_TMP_FOR_LOCAL="$S_TMP_0$S_TMP_1`uuidgen`" S_TMP_FOR_COMMIT_MESSAGE="$S_TMP_0$S_TMP_1`uuidgen`" mkdir -p $S_TMP_FOR_LOCAL chmod -f -R u+rwx $S_FP_SANDBOX mv -f $S_FP_SANDBOX/* $S_TMP_FOR_LOCAL/ # the -f is for empty sandbox #-------- fun_activity_core_overwrite_local_with_remote fun_last_minute_checks_t1 "$S_FP_SANDBOX" # should there be flaws elsewhere chmod -f -R u+rwx $S_FP_SANDBOX # to be able to delete the old content #-------- cd $S_FP_SANDBOX fossil open $S_FP_DIR/$S_FP_FOSSILFILE_NAME # full path for reliability fossil settings autosync off ; fun_folder_is_empty_t1 "$S_FP_SANDBOX" SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED="f" if [ "$SB_FOLDER_IS_EMPTY" == "f" ]; then fossil rm --hard --case-sensitive TRUE ./* SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED="t" fun_last_minute_checks_t1 "`pwd`" if [ "$S_FP_SANDBOX" == "`pwd`" ]; then rm -fr ./* else echo "" echo "This Bash script is flawed." echo "GUID=='39b31171-e088-4d93-94bd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi fi mv -f $S_TMP_FOR_LOCAL/* $S_FP_SANDBOX/ # the -f is for empty source #---- fun_last_minute_checks_t1 "$S_TMP_FOR_LOCAL" rm -fr $S_TMP_FOR_LOCAL #---- fun_folder_is_empty_t1 "$S_FP_SANDBOX" if [ "$SB_FOLDER_IS_EMPTY" == "f" ]; then if [ "$S_FP_SANDBOX" != "`pwd`" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='7e89c51b-f97c-43d2-a5bd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi find . -name '*' | xargs fossil add --force --dotfiles --case-sensitive TRUE SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED="t" fi if [ "$SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED" == "t" ]; then if [ "$2" == "" ]; then echo "" #echo "Please enter a one-liner commit message: " #S_TMP_0="`ruby -e \"s=gets.gsub(/[\n\r\s]/,'');print(s)\"`" # TODO: improve this script so that it would not ask # for a commit message, when nothing changed. It requires # some recursive analysis of files, which might be slow. # This script is not optimal for speed even now and that would # make it even slower. On the other hand, usually when # the upload operation is initiated, there are some changes, # which means that the slow analysis would be useless in # most frequent cases. So this thing needs to be figured out # at some later time, when there is more experience with the # use of this script. read -p "Please enter a one-liner commit message: " S_TMP_0 echo $S_TMP_0 > $S_TMP_FOR_COMMIT_MESSAGE else if [ "$2" == "use_autogenerated_commit_message" ]; then echo "Autogenerated commit message timestamp: $S_TIMESTAMP" > $S_TMP_FOR_COMMIT_MESSAGE else if [ "$2" == "read_commit_message_from_file" ]; then S_FP_MESSAGE_FILE_CANDIDATE="$3" # file path candidate # Initial file existence and type checks for the # $S_FP_MESSAGE_FILE_CANDIDATE # were conducted at the start of the script. # but the $S_FP_MESSAGE_FILE_CANDIDATE might have # referenced a file in the sandbox and # that file might have been just removed/deleted. # # There is no threat that the file got changed to a folder # or a symlink switched from a file to a folder, # at least that's the case for the single threaded model. if [ ! -e "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then # missing or a broken symlink echo "" echo "The commit message file is missing or " echo "references a broken symlink." echo "The file or symlink to it was fine at " echo "the start of this script, it passed the various tests, " echo "but for some reason it got deleted or its target . " echo "got deleted. If the commit message file or" echo "the symlink target resided within the sandbox, then " echo "a recommendation is to use a file that resides " echo "outside of the sandbox." echo "GUID=='9c0865d1-1134-4203-92bd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ -d "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then # folder or a symlink to a folder echo "" echo "The commit message file path does not reference " echo "a file. It references a folder or a symlink to a folder." echo "The file or symlink to it was fine at " echo "the start of this script, it passed the various tests, " echo "but for some reason there were changes. " echo "GUID=='4a707715-ffe8-47ca-b4bd-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi cat $S_FP_MESSAGE_FILE_CANDIDATE > $S_TMP_FOR_COMMIT_MESSAGE # else # Due to the checks at the start of the script # this else branch is useless. fi fi fi #-------- fossil commit --message-file $S_TMP_FOR_COMMIT_MESSAGE #---- fun_last_minute_checks_t1 "$S_TMP_FOR_COMMIT_MESSAGE" rm -f $S_TMP_FOR_COMMIT_MESSAGE #---- fi #-------- fossil push --private fossil push fossil pull --private fossil close #---- cd $S_FP_ORIG exit 0 fi # overwrite_remote_with_local #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "shred_local_copy" ]; then #-------- SB_THERE_IS_SOMETHING_TO_DELETE="f" if [ "$SB_FOSSILFILE_EXISTS" == "t" ]; then SB_THERE_IS_SOMETHING_TO_DELETE="t" fi if [ "$SB_SANDBOX_DIR_EXISTS" == "t" ]; then SB_THERE_IS_SOMETHING_TO_DELETE="t" fi if [ "$SB_ARCHIVE_DIR_EXISTS" == "t" ]; then SB_THERE_IS_SOMETHING_TO_DELETE="t" fi #-------- if [ "$SB_THERE_IS_SOMETHING_TO_DELETE" == "t" ]; then if [ "$2" != "$S_ARGNAME_ACTIVITY_SHRED_ARG_2" ]; then # Includes the $2=="" case # id est if the control flow is in here, then there # is a need to prompt for confirmation. # The skipping of the prompt is necessary for # software that use this script as its sub-component. #-------- echo "" echo "The command \"shred_local_copy\" deletes " echo "the repository file, the sandbox and " echo "the associated automatically created archives." echo "" read -p "Proceed with deletion? (Yes/whatever_else) " S_TMP_0 S_TMP_1="`echo $S_TMP_0 | gawk '{print tolower($1)}'`" if [ "$S_TMP_1" == "yes" ]; then echo "" printf "Deleting ... " else fun_exit_without_any_errors_t1 fi fi fi #-------- if [ "$SB_FOSSILFILE_EXISTS" == "t" ]; then cd $S_FP_DIR # just in case # The shred "-f" option re-sets file access permissions as needed. nice -n10 shred -f --remove $S_FP_FOSSILFILE fi #-------- if [ "$SB_SANDBOX_DIR_EXISTS" == "t" ]; then cd $S_FP_SANDBOX fun_last_minute_checks_t1 "`pwd`" #-------- # The S_TMP_0 is to suppress shred output. S_TMP_0="`find . -name '*' | xargs shred -f --remove 2>/dev/null`" #---- cd $S_FP_DIR # step out of the sandbox directory fun_last_minute_checks_t1 "$S_FP_SANDBOX" chmod -f -R 0700 $S_FP_SANDBOX rm -fr $S_FP_SANDBOX fi #-------- if [ "$SB_ARCHIVE_DIR_EXISTS" == "t" ]; then cd $S_FP_ARCHIVES fun_last_minute_checks_t1 "`pwd`" #-------- # The S_TMP_0 is to suppress shred output. S_TMP_0="`find . -name '*' | xargs shred -f --remove 2>/dev/null`" #---- cd $S_FP_DIR # step out of the archive directory fun_last_minute_checks_t1 "$S_FP_ARCHIVES" chmod -f -R 0700 $S_FP_ARCHIVES rm -fr $S_FP_ARCHIVES fi #-------- if [ "$SB_THERE_IS_SOMETHING_TO_DELETE" == "t" ]; then if [ "$2" != "$S_ARGNAME_ACTIVITY_SHRED_ARG_2" ]; then echo "✓" echo "" fi fi #-------- cd $S_FP_ORIG exit 0 fi # shred_local_copy #-------------------------------------------------------------------------- # All possible actions must have been described # above this code block. echo "" echo "This Bash script is flawed." echo "GUID=='4332a245-ca3c-45d0-8bad-60c2018160e7'" echo "" #---- cd $S_FP_ORIG exit 1 #========================================================================== |
Added milestone_releases/2016_06_24_Silktorrent/doc/clone_of_the_public_regions_of_the_Fossil_repository/repository_storage.fossil version [c392fefe63].
cannot compute difference between binary files
Added milestone_releases/2016_06_24_Silktorrent/src/silktorrent_packager_t1_v2016_06_24.bash version [5cd5733ef1].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 |
#!/usr/bin/env bash #========================================================================== # # The MIT license from the # http://www.opensource.org/licenses/mit-license.php # # Copyright 2016, martin.vahi@softf1.com that has an # Estonian personal identification code of 38108050020. # # Permission is hereby granted, free of charge, to # any person obtaining a copy of this software and # associated documentation files (the "Software"), # to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and # to permit persons to whom the Software is furnished to do so, # subject to the following conditions: # # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # #========================================================================== S_FP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" S_FP_ORIG="`pwd`" S_TIMESTAMP="`date +%Y`_`date +%m`_`date +%d`_T_`date +%H`h_`date +%M`min_`date +%S`s" #-------------------------------------------------------------------------- SB_TMP_FOLDER_EXISTS="f" # to omit one useless and slow file system access S_FP_TMP_FOLDER="" func_mmmv_silktorrent_packager_t1_exit_without_any_errors() { local S_0="" local S_1="" if [ "$SB_TMP_FOLDER_EXISTS" == "t" ]; then S_0= fi exit 0 # exit without an error } # func_mmmv_silktorrent_packager_t1_exit_without_any_errors #-------------------------------------------------------------------------- S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="" func_mmmv_operating_system_type_t1() { if [ "$S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT" == "" ]; then S_TMP_0="`uname -a | grep -E [Ll]inux`" if [ "$S_TMP_0" != "" ]; then S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="Linux" else S_TMP_0="`uname -a | grep BSD `" if [ "$S_TMP_0" != "" ]; then S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="BSD" else S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="undetermined" fi fi fi } # func_mmmv_operating_system_type_t1 #-------------------------------------------------------------------------- func_mmmv_operating_system_type_t1 if [ "$S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT" != "Linux" ]; then if [ "$S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT" != "BSD" ]; then echo "" echo " The classical command line utilities at " echo " different operating systems, for example, Linux and BSD," echo " differ. This script is designed to run only on " echo " Linux and some BSD variants." echo " If You are willing to risk that some of Your data " echo " is deleted and/or Your operating system instance" echo " becomes permanently flawed, to the point that " echo " it will not even boot, then You may edit the Bash script that " echo " displays this error message by modifying the test that " echo " checks for the operating system type." echo "" echo " If You do decide to edit this Bash script, then " echo " a recommendation is to test Your modifications " echo " within a virtual machine or, if virtual machines are not" echo " an option, as some new operating system user that does not have " echo " any access to the vital data/files." echo " GUID=='ae8bec13-4773-4811-94a2-83f2c08160e7'" echo "" echo " Aborting script without doing anything." echo "" exit 1 # exit with error fi fi #-------------------------------------------------------------------------- SB_EXISTS_ON_PATH_T1_RESULT="f" func_sb_exists_on_path_t1 () { local S_NAME_OF_THE_EXECUTABLE_1="$1" # first function argument #-------- # Function calls like # # func_sb_exists_on_path_t1 "" # func_sb_exists_on_path_t1 " " # func_sb_exists_on_path_t1 "ls ps" # contains a space # # are not allowed. if [ "$S_NAME_OF_THE_EXECUTABLE_1" == "" ] ; then echo "" echo "The Bash function " echo "" echo " func_sb_exists_on_path_t1 " echo "" echo "is not designed to handle an argument that " echo "equals with an empty string." echo "GUID=='d26d1825-90bf-4ab7-94a2-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_1\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_1" != "$S_TMP_0" ] ; then echo "" echo "The Bash function " echo "" echo " func_sb_exists_on_path_t1 " echo "" echo "is not designed to handle an argument value that contains " echo "spaces or tabulation characters." echo "The received value in parenthesis:($S_NAME_OF_THE_EXECUTABLE_1)." echo "GUID=='8b402457-dd5b-4921-b2a2-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_1 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" else SB_EXISTS_ON_PATH_T1_RESULT="t" fi } # func_sb_exists_on_path_t1 func_assert_exists_on_path_t2 () { local S_NAME_OF_THE_EXECUTABLE_1="$1" # first function argument local S_NAME_OF_THE_EXECUTABLE_2="$2" # optional argument local S_NAME_OF_THE_EXECUTABLE_3="$3" # optional argument local S_NAME_OF_THE_EXECUTABLE_4="$4" # optional argument #-------- # Function calls like # # func_assert_exists_on_path_t2 "" "" "ls" # func_assert_exists_on_path_t2 "ls" "" "ps" # # are not allowed by the spec of this function, but it's OK to call # # func_assert_exists_on_path_t2 "ls" "" # func_assert_exists_on_path_t2 "ls" "ps" "" # func_assert_exists_on_path_t2 "ls" "" "" "" # # local SB_THROW="f" if [ "$S_NAME_OF_THE_EXECUTABLE_1" == "" ] ; then SB_THROW="t" else if [ "$S_NAME_OF_THE_EXECUTABLE_2" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_3" != "" ] ; then SB_THROW="t" fi if [ "$S_NAME_OF_THE_EXECUTABLE_4" != "" ] ; then SB_THROW="t" fi else if [ "$S_NAME_OF_THE_EXECUTABLE_3" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" != "" ] ; then SB_THROW="t" fi fi fi fi #---- if [ "$SB_THROW" == "t" ] ; then echo "" echo "The Bash function " echo "" echo " func_assert_exists_on_path_t2 " echo "" echo "is not designed to handle series of arguments, where " echo "empty strings preced non-empty strings." echo "GUID=='ebdae326-6445-46bf-9292-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi if [ "$5" != "" ] ; then echo "" echo "This Bash function is designed to work with at most 4 input arguments" echo "GUID=='522b025f-199b-49f1-a292-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # Function calls like # # func_assert_exists_on_path_t2 " " # func_assert_exists_on_path_t2 "ls ps" # contains a space # # are not allowed. SB_THROW="f" local S_TMP_0="" local S_TMP_1="" local S_TMP_2="" #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_1\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_1" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_1" S_TMP_2="GUID=='4f034735-f71d-4fda-9192-83f2c08160e7'" fi fi #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_2\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_2" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_2" S_TMP_2="GUID=='d8ee8e35-3634-4963-b192-83f2c08160e7'" fi fi #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_3\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_3" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_3" S_TMP_2="GUID=='198c2e17-f678-451d-8192-83f2c08160e7'" fi fi #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_4\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_4" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_4" S_TMP_2="GUID=='405c6c1c-7830-4bc4-a492-83f2c08160e7'" fi fi #-------- if [ "$SB_THROW" == "t" ] ; then echo "" echo "The Bash function " echo "" echo " func_assert_exists_on_path_t2 " echo "" echo "is not designed to handle an argument value that contains " echo "spaces or tabulation characters." echo "The unaccepted value in parenthesis:($S_TMP_1)." echo "Branch $S_TMP_2." echo "GUID=='efcc3ce1-f52a-4f28-b582-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi SB_THROW="f" # Just a reset, should I forget to reset it later. #--------------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_1 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_2" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_3" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" == "" ] ; then echo "" echo "This bash script requires the \"$S_NAME_OF_THE_EXECUTABLE_1\" to be on the PATH." echo "GUID=='b10b8c12-1d9e-4a4b-b482-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi fi else return # at least one of the programs was available at the PATH fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_2 2>/dev/null\`" S_TMP_1="" S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_3" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" == "" ] ; then echo "" echo "This bash script requires that either \"$S_NAME_OF_THE_EXECUTABLE_1\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_2\" is available on the PATH." echo "GUID=='a3730829-4edf-4221-9482-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi else return # at least one of the programs was available at the PATH fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_3 2>/dev/null\`" S_TMP_1="" S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" == "" ] ; then echo "" echo "This bash script requires that either \"$S_NAME_OF_THE_EXECUTABLE_1\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_2\" or \"$S_NAME_OF_THE_EXECUTABLE_3\" " echo "is available on the PATH." echo "GUID=='50757072-5884-4bf0-8482-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi else return # at least one of the programs was available at the PATH fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_4 2>/dev/null\`" S_TMP_1="" S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then echo "" echo "This bash script requires that either \"$S_NAME_OF_THE_EXECUTABLE_1\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_2\" or \"$S_NAME_OF_THE_EXECUTABLE_3\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_4\" is available on the PATH." echo "GUID=='ece93119-b340-44ea-8382-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error else return # at least one of the programs was available at the PATH fi #-------- } # func_assert_exists_on_path_t2 func_assert_exists_on_path_t2 "bash" # this is a bash script, but it does not hurt func_assert_exists_on_path_t2 "basename" # for extracting file names from full paths func_assert_exists_on_path_t2 "cat" # opposite to split func_assert_exists_on_path_t2 "sha256sum" "sha256" "rhash" func_assert_exists_on_path_t2 "tigerdeep" "rhash" func_assert_exists_on_path_t2 "whirlpooldeep" "rhash" func_assert_exists_on_path_t2 "tar" #-------- func_assert_exists_on_path_t2 "file" # for checking the MIME type of the potential tar file func_assert_exists_on_path_t2 "filesize" "ruby" func_assert_exists_on_path_t2 "gawk" #func_assert_exists_on_path_t2 "grep" #func_assert_exists_on_path_t2 "readlink" func_assert_exists_on_path_t2 "ruby" # anything over/equal v.2.1 will probably do #func_assert_exists_on_path_t2 "split" # for cutting files #func_assert_exists_on_path_t2 "test" func_assert_exists_on_path_t2 "uname" # to check the OS type func_assert_exists_on_path_t2 "uuidgen" "uuid" # GUID generation on Linux and BSD #func_assert_exists_on_path_t2 "xargs" func_assert_exists_on_path_t2 "wc" # for checking hash lengths #-------------------------------------------------------------------------- func_mmmv_exc_hash_function_input_verification_t1() { local S_NAME_OF_THE_BASH_FUNCTION="$1" # The name of the Bash function. local S_FP_2_AN_EXISTING_FILE="$2" # The first argument of the Bash function. #-------- if [ "$S_NAME_OF_THE_BASH_FUNCTION" == "" ] ; then echo "" echo "The implementation of the function that " echo "calls the " echo "" echo " func_mmmv_exc_hash_function_input_verification_t1" echo "" echo "is flawed. The call to the " echo "" echo " func_mmmv_exc_hash_function_input_verification_t1" echo "" echo "misses the first argument or the first argument is an empty string." echo "GUID=='5daa2d36-5d4a-45ac-b482-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`printf \"$S_NAME_OF_THE_BASH_FUNCTION\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_BASH_FUNCTION" != "$S_TMP_0" ] ; then echo "" echo "The implementation of the function that " echo "calls the " echo "" echo " func_mmmv_exc_hash_function_input_verification_t1" echo "" echo "is flawed. Function names are not allowed to contain spaces or tabs." echo "GUID=='32fcb7e5-7f9c-42c5-a382-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # Function calls like # # <function name> "" # <function name> " " # # are not allowed. local S_TMP_0="`printf \"$S_FP_2_AN_EXISTING_FILE\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_TMP_0" == "" ] ; then echo "" echo "The Bash function " echo "" echo " $S_NAME_OF_THE_BASH_FUNCTION" echo "" echo "is not designed to handle an argument that " echo "equals with an empty string or a series of spaces and tabs." echo "GUID=='59c6d156-1693-41f5-a282-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ ! -e $S_FP_2_AN_EXISTING_FILE ] ; then echo "" echo "The file " echo "" echo " $S_FP_2_AN_EXISTING_FILE " echo "" echo "is missing or it is a broken link." echo "GUID=='2bdfa731-a82d-4c24-9182-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi if [ -d $S_FP_2_AN_EXISTING_FILE ] ; then echo "" echo "The file path " echo "" echo " $S_FP_2_AN_EXISTING_FILE " echo "" echo "references a folder, but a file is expected." echo "GUID=='342e52a2-f7fa-41c9-b572-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- # At this line the verifications have all passed. #-------------------- } # func_mmmv_exc_hash_function_input_verification_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_GUID_T1_RESULT="not_yet_set" S_FUNC_MMMV_GUID_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_GUID_t1() { # Does not take any arguments. #-------- #func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_GUID_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="uuidgen" # Linux version func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_GUID_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="uuid" # BSD version func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_GUID_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "" ] ; then echo "" echo "All of the GUID generation implementations that this script " echo "is capable of using (uuidgen, uuid) " echo "are missing from the PATH." echo "GUID=='92cc9502-5791-4674-8672-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='69f2c03e-920f-4bbf-8472-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_GUID_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "uuidgen" ]; then S_TMP_0="`uuidgen`" if [ "$?" != "0" ]; then echo "" echo "The console application \"uuidgen\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`uuidgen`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='899ef135-d280-406a-b362-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- S_FUNC_MMMV_GUID_T1_RESULT="$S_TMP_0" fi #-------------------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "uuid" ]; then S_TMP_0="`uuid`" if [ "$?" != "0" ]; then echo "" echo "The console application \"uuid\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`uuid`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='185b4073-5086-4196-9462-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- S_FUNC_MMMV_GUID_T1_RESULT="$S_TMP_0" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_GUID_T1_RESULT\" | wc -m | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" S_TMP_1="36" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the GUID specification, IETF RFC 4122, " echo "the lenght of the GUID is " echo "$S_TMP_1 characters, but the result of the " echo "" echo " func_mmmv_GUID_t1" echo "" echo "is something else. The flawed GUID candidate in parenthesis:" echo "($S_FUNC_MMMV_GUID_T1_RESULT)" echo "" echo "The lenght candidate of the flawed GUID candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='8fc9064f-4364-490c-9262-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_GUID_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SHA256_T1_RESULT="not_yet_set" S_FUNC_MMMV_SHA256_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_sha256_t1() { # requires also ruby and gawk local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_sha256_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="sha256sum" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SHA256_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="rhash" # part of the BSD package collection in 2016 func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SHA256_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="sha256" # usually available on BSD func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SHA256_T1_MODE="$S_TMP_0" fi fi # The console application "rhash" is preferred to the "sha256" # because the "rhash" output can be simply processed with # "gawk", which takes over 5x less memory than the Ruby interpreter, # not to mention the initialization cost of the Ruby interpreter. #-------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "" ] ; then echo "" echo "All of the SHA-256 implementations that this script " echo "is capable of using (sha256sum, rhash, sha256) " echo "are missing from the PATH." echo "GUID=='446b14b1-7fc2-494d-8362-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='7d241052-f154-434c-a262-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_SHA256_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "sha256sum" ]; then S_TMP_0="`sha256sum $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"sha256sum\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`sha256sum $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='ec70acd6-b0de-4e1b-a262-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- # The gawk is used for selecting the 1. column because # according to the # # echo "aa bb" | time -v gawk '{printf $1}' # # the gawk takes about 3MiB, which is far less than the # # time -v ruby -e "puts 'hi'" # # indicated 16MiB # S_FUNC_MMMV_SHA256_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "rhash" ]; then S_TMP_0="`rhash --sha256 $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"rhash\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`rhash --sha256 $S_FP_2_AN_EXISTING_FILE `" echo "----console--outut--citation--end-------" echo "" echo "GUID=='56091f39-0544-449c-a562-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_SHA256_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "sha256" ]; then #---- S_FUNC_MMMV_SHA256_T1_RESULT=\ "`S_TMP_0=\"\`sha256 $S_FP_2_AN_EXISTING_FILE\`\" ruby -e \"s0=ENV['S_TMP_0'].to_s;ix_0=s0.index(') = ');print s0[(ix_0+4)..(-1)]\" 2>/dev/null`" #---- if [ "$?" != "0" ]; then echo "" echo "The console application \"sha256\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo \ "`S_TMP_0=\"\`sha256 $S_FP_2_AN_EXISTING_FILE\`\" ruby -e \"s0=ENV['S_TMP_0'].to_s;ix_0=s0.index(') = ');print s0[(ix_0+4)..(-1)]\"`" echo "----console--outut--citation--end-------" echo "" echo "GUID=='65d0c243-954c-4d36-a452-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_SHA256_T1_RESULT\" | wc -m | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" S_TMP_1="64" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the specification of the SHA-256 hash algorithm" echo "the lenght of the SHA-256 hash is " echo "$S_TMP_1 hexadecimal characters, but the result of the " echo "" echo " func_mmmv_sha256_t1" echo "" echo "is something else. The flawed hash candidate in parenthesis:" echo "($S_FUNC_MMMV_SHA256_T1_RESULT)" echo "" echo "The lenght candidate of the flawed hash candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='9fbed31c-5742-4c66-a352-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_sha256_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_TIGERHASH_T1_RESULT="not_yet_set" S_FUNC_MMMV_TIGERHASH_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_tigerhash_t1() { # requires also ruby and gawk local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_tigerhash_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="tigerdeep" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_TIGERHASH_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="rhash" # part of the BSD package collection in 2016 func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_TIGERHASH_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "" ] ; then echo "" echo "All of the Tiger hash implementations that this script " echo "is capable of using (tigerdeep, rhash) " echo "are missing from the PATH." echo "GUID=='e0e0004d-7492-4aae-8152-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='4e6ce53e-0891-4a84-a152-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_TIGERHASH_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "tigerdeep" ]; then S_TMP_0="`tigerdeep $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"tigerdeep\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`tigerdeep $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='0ac9014e-b1d8-49c0-a352-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_TIGERHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "rhash" ]; then S_TMP_0="`rhash --tiger $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"rhash\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`rhash --tiger $S_FP_2_AN_EXISTING_FILE `" echo "----console--outut--citation--end-------" echo "" echo "GUID=='0d5ce111-3bf8-4eee-9252-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_TIGERHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_TIGERHASH_T1_RESULT\" | wc -m | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" S_TMP_1="48" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the specification of the Tiger hash algorithm" echo "the lenght of the Tiger hash is " echo "$S_TMP_1 hexadecimal characters, but the result of the " echo "" echo " func_mmmv_tigerhash_t1" echo "" echo "is something else. The flawed hash candidate in parenthesis:" echo "($S_FUNC_MMMV_TIGERHASH_T1_RESULT)" echo "" echo "The lenght candidate of the flawed hash candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='23b13133-f4fb-46fd-8552-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_tigerhash_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="not_yet_set" S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_whirlpoolhash_t1() { # requires also ruby and gawk local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_whirlpoolhash_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="whirlpooldeep" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="rhash" # part of the BSD package collection in 2016 func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "" ] ; then echo "" echo "All of the Whirlpool hash implementations that this script " echo "is capable of using (whirlpooldeep, rhash) " echo "are missing from the PATH." echo "GUID=='3ec66a62-8721-42e7-b252-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='a812ee31-2b39-4268-9242-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "whirlpooldeep" ]; then S_TMP_0="`whirlpooldeep $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"whirlpooldeep\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`whirlpooldeep $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='5ac1162f-5b05-4db9-8442-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "rhash" ]; then S_TMP_0="`rhash --whirlpool $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"rhash\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`rhash --whirlpool $S_FP_2_AN_EXISTING_FILE `" echo "----console--outut--citation--end-------" echo "" echo "GUID=='37202b22-1600-406b-9142-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT\" | wc -m | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" S_TMP_1="128" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the specification of the Whirlpool hash algorithm" echo "the lenght of the Tiger hash is " echo "$S_TMP_1 hexadecimal characters, but the result of the " echo "" echo " func_mmmv_whirlpoolhash_t1" echo "" echo "is something else. The flawed hash candidate in parenthesis:" echo "($S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT)" echo "" echo "The lenght candidate of the flawed hash candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='6f22524d-5309-48d6-9142-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_whirlpoolhash_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_FILESIZE_T1_RESULT="not_yet_set" S_FUNC_MMMV_FILESIZE_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_filesize_t1() { local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_filesize_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="filesize" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_FILESIZE_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="ruby" # helps on BSD func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_FILESIZE_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "" ] ; then echo "" echo "All of the applications that this function is " echo "capable of using for finding out file size (filesize, ruby)" echo "are missing from the PATH." echo "GUID=='c16c313b-1051-410e-a242-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='3b8d513c-90dd-406b-a442-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_FILESIZE_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "filesize" ]; then S_TMP_0="`filesize $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"filesize\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`filesize $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='28f88541-0f95-4a94-8442-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_FILESIZE_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "ruby" ]; then S_TMP_0="`ruby -e \"printf(File.size('$S_FP_2_AN_EXISTING_FILE').to_s)\" 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"ruby\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`ruby -e \"printf(File.size('$S_FP_2_AN_EXISTING_FILE').to_s)\"`" echo "----console--outut--citation--end-------" echo "" echo "GUID=='53b91474-cdfe-43f8-b242-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_FILESIZE_T1_RESULT="$S_TMP_0" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_FILESIZE_T1_RESULT\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" local SB_THROW="f" if [ "$S_TMP_0" != "$S_FUNC_MMMV_FILESIZE_T1_RESULT" ]; then SB_THROW="t" else if [ "$S_FUNC_MMMV_FILESIZE_T1_RESULT" == "" ]; then SB_THROW="t" fi fi #---- if [ "$SB_THROW" == "t" ]; then echo "" echo "The result of the " echo "" echo " func_mmmv_filesize_t1" echo "" echo "for " echo "" echo "($S_FUNC_MMMV_FILESIZE_T1_RESULT)" echo "" echo "either contain spaces, tabs or is an empty string," echo "which is wrong, because even a file with the size of 0 " echo "should have a file size of \"0\", which is not an empty string." echo "GUID=='4e5a622c-7b21-4de0-a432-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_filesize_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1() { echo "" echo "Command line format: " echo "" echo "<the name of this script> ARGLIST " echo "" echo " ARGLIST :== help | WRAP | UNWRAP | VERIFY | RUN_SELFTEST " echo " WRAP :== wrap <file path> " echo " UNWRAP :== unwrap <file path> " echo " VERIFY :== verify <file path> " echo " RUN_SELFTEST :== test_hash_t1 <file path> " echo "" echo "" echo "" } # func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1() { local S_FP_0="$1" # Path to the file. #-------- if [ "$S_FP_0" == "" ]; then echo "" echo "The 2. console argument is expected to be " echo "a path to a file, but currently " echo "the 2. console argument is missing." echo "GUID=='fe2aff9e-9555-40a3-b332-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ ! -e "$S_FP_0" ]; then if [ -h "$S_FP_0" ]; then echo "" echo "The file path " echo "" echo " $S_FP_0" echo "" echo "is a path of a broken symlink, but symlinks " echo "are not supported at all." echo "The reason, why symlinks to files are not supported is that " echo "the file size of symlinks can differ from " echo "the file size of the target of the symlink." echo "GUID=='60e5391a-37c5-48e4-b332-83f2c08160e7'" echo "" else echo "" echo "The file with the path of " echo "" echo " $S_FP_0" echo "" echo "does not exist." echo "GUID=='45c4b001-7a5c-4a0a-b732-83f2c08160e7'" echo "" fi #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ -d "$S_FP_0" ]; then if [ -h "$S_FP_0" ]; then echo "" echo "The path " echo "" echo " $S_FP_0" echo "" echo "references a symlink that references folder, but " echo "a file is expected." echo "GUID=='4b3f22d7-441b-4de8-b432-83f2c08160e7'" echo "" else echo "" echo "The path " echo "" echo " $S_FP_0" echo "" echo "references a folder, but it is expected to " echo "to reference a file." echo "GUID=='f3d00ec1-40be-4f84-a432-83f2c08160e7'" echo "" fi #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ -h "$S_FP_0" ]; then echo "" echo "The path " echo "" echo " $S_FP_0" echo "" echo "references a symlink, a file is expected." echo "The reason, why symlinks to files are not supported is that " echo "the file size of symlinks can differ from " echo "the file size of the target of the symlink." echo "GUID=='20430c48-653d-4a05-b432-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="for input and output" S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE="" # optim. hack func_mmmv_silktorrent_packager_t1_bash_reverse_string() { local S_IN="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER" #-------------------- local S_TMP_0="not set" # Mode selection: if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="gawk" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="ruby" # helps on BSD func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "" ] ; then echo "" echo "All of the applications that this function is " echo "capable of using for finding out file size (gawk, ruby)" echo "are missing from the PATH." echo "GUID=='35084451-8a4f-465e-a222-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='d1cca38b-d5ee-4fc9-a822-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- #-------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="" #-------- if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "gawk" ]; then # The awk code example originates from # http://www.linuxandlife.com/2013/06/how-to-reverse-string.html # archival copy: https://archive.is/Cx0xF #---- S_TMP_0="`printf "$S_IN" | \ awk '{ for(i=length;i!=0;i--)x=x substr($0,i,1);}END{printf x}'`" if [ "$?" != "0" ]; then echo "" echo "The console application \"gawk\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`printf "$S_IN" | awk '{ for(i=length;i!=0;i--)x=x substr($0,i,1);}END{printf x}'`" echo "----console--outut--citation--end-------" echo "" echo "GUID=='2e32181a-f13c-49bf-8222-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="$S_TMP_0" fi #-------- if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "ruby" ]; then #---- S_TMP_0="`ruby -e \"puts(ARGV[0].to_s.reverse)\" "$S_IN" 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"ruby\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`ruby -e \"puts('$S_IN'.reverse)\"`" # with the stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='4707c539-4300-4cb5-8322-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="$S_TMP_0" fi #-------------------- } # func_mmmv_silktorrent_packager_t1_bash_reverse_string #-------------------------------------------------------------------------- # As of 2016 the maximum file name length on Linux is 255 characters. # At # # http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs # # the eCryptfs related recommendation is to keep the lengths # of file names to less than 140 characters. # # A citation from # http://windows.microsoft.com/en-us/windows/file-names-extensions-faq#1TC=windows-7 # archieval copy: https://archive.is/UKBmd # "Windows limits a single path to 260 characters." # # A citation from CygWin mailing list: # https://cygwin.com/ml/cygwin/2004-10/msg01323.html # archival copy: https://archive.is/GRvFK # "The Unicode versions of several functions permit a # maximum path length of 32,767 characters, # composed of components up to 255 characters in length. # To specify such a path, use the "\\?\" prefix. For example, # "\\?\D:\<path>". To specify such a UNC path, use the "\\?\UNC\" # prefix. For example, "\\?\UNC\<server>\<share>". # Note that these prefixes are not used as part of the path # itself. They indicate that the path should be passed to the # system with minimal modification. An implication of this is # that you cannot use forward slashes to represent path separators # or a period to represent the current directory." # Related pages: # https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx # archival copy: https://archive.is/p891y # # To allow database indexes that store the # file names of the blogs # to work as efficiently as possible, the first # characters of the file name should be as # uniformly random set of characters as possible. # If file name starts with a secure hash, then # that requirement is met. # # The parser that dismantles the file name to relevant components # should be implementable in different programming languages # without investing considerable amount of development time. # The syntax of the file name should also allow the # file name to be parsed computationally cheaply. # # As of 2016_05 the file extension .stblob seems to be unused. # Therefore the "silktorrent blob", .stblob, can be used for the # extension of the blob files. # # Compression of the blobs IS NOT ALLOWED, because the # blobs must be extractable without becoming a victim # of an attack, where 100GiB of zeros is packed to a # small file. The container format is the tar format, # without any compression. S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT="not set" func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- # The Tiger hash has 48 characters. # The Whirlpool hash has 128 characters. # The SHA-256 hash has 64 characters. # # A file size of 1TiB is ~10^12 ~ 13 characters # A file size of 1PiB is ~10^15 ~ 14 characters # A file size of 1EiB is ~10^18 ~ 19 characters # A file size of 1ZiB is ~10^21 ~ 22 characters # A file size of 1YiB is ~10^24 ~ 25 characters # # The max. file name length on Linux and # Windows (Unicode API) is 255 characters. #---- # The character budget: # 6 characters --- file name format type ID # rgx_in_ruby=/v[\d]{4}[_]/ # echo "v0034_s2342_" | gawk '{ gsub(/_/, "_\n"); print }' | \ # gawk '/^v[0-9]{4}_/ {printf "%s",$1 }' | \ # gawk '{gsub(/[v_]/,"");printf "%s", $1 }' # # max 32 characters --- file size # rgx_in_ruby=/s[\d]+[_]/ # echo "v0034_" | gawk '/^v[0-9]{4}_/ {printf "%s",$1 }' # echo "v0034_s2342_" | gawk '{ gsub(/_/, "_\n"); print }' | \ # gawk '/^s[0-9]+_/ {printf "%s",$1 }' | \ # gawk '{gsub(/[s_]/,"");printf "%s", $1 }' # # # 66 characters --- SHA-256 # rgx_in_ruby=/h[\dabcdef]{64}[_]/ # echo "h`sha256sum /dev/null | gawk '/[0-9abcdef]/ {printf "%s",$1}'`_" | \ # gawk '/^h[0-9abcdef]+_/ {printf "%s",$1 }' | \ # gawk '{gsub(/[h_]/,"");printf "%s", $1 }' # # # 50 characters --- Tiger # rgx_in_ruby=/i[\dabcdef]{48}$/ # lacks the ending "_" # # for db index optimization # The gawk code is as with the sha256, # except that sha256sum-> tigerdeep, "^h"->"^i", # "[h_]"->"[i_]" # #-------- # As the current version of this script depends on Ruby anyway, # the gawk regex based branches that are really # complex and require multiple gawk calls can be left unimplemented. # That way this script becomes more succinct. #-------------------- func_mmmv_tigerhash_t1 "$S_FP_0" #echo " Tiger: $S_FUNC_MMMV_TIGERHASH_T1_RESULT" #func_mmmv_whirlpoolhash_t1 "$S_FP_0" #echo " Whirlpool: $S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT" func_mmmv_sha256_t1 "$S_FP_0" #echo " SHA256: $S_FUNC_MMMV_SHA256_T1_RESULT" func_mmmv_filesize_t1 "$S_FP_0" #echo " file size: $S_FUNC_MMMV_FILESIZE_T1_RESULT" #-------- local S_NAME_REVERSED="bolbts." # ".stblob".reverse local S_0="v0001_s$S_FUNC_MMMV_FILESIZE_T1_RESULT" S_NAME_REVERSED="$S_NAME_REVERSED$S_0" S_0="_h$S_FUNC_MMMV_SHA256_T1_RESULT" S_NAME_REVERSED="$S_NAME_REVERSED$S_0" S_0="_i$S_FUNC_MMMV_TIGERHASH_T1_RESULT" S_NAME_REVERSED="$S_NAME_REVERSED$S_0" #---- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="$S_NAME_REVERSED" func_mmmv_silktorrent_packager_t1_bash_reverse_string S_0="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER" S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT="$S_0" } # func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1 #-------------------------------------------------------------------------- func_mmmv_delete_tmp_folder_t1(){ local S_FP_0="$1" # folder path #-------- if [ ! -e "$S_FP_0" ]; then echo "" echo "This script is flawed. The folder " echo " $S_FP_0" echo "is expected to exist during the " echo "call to this function." echo "GUID=='28744c23-746a-45de-8322-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # To avoid a situation, where due to some # flaw the home folder or something else important # gets accidentally recursively deleted, # the following test transforms the path from # /tmp/../home/blabla # to a full path without the dots and then studies, whether # the full path points to somehwere in the /tmp local S_FP_1="`cd $S_FP_0; pwd`" if [ ! -e "$S_FP_1" ]; then echo "" echo "This script is flawed. The folder " echo " $S_FP_1" echo "is missing." echo "GUID=='d16bd124-bc70-4114-8322-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`echo \"$S_FP_1\" | grep -E ^/home `" if [ "$S_TMP_0" != "" ]; then echo "" echo "This script is flawed." echo "The temporary sandbox folder must reside in /tmp." echo "" echo "S_FP_0==$S_FP_0" echo "" echo "S_FP_1==$S_FP_1" echo "" echo "S_TMP_0==$S_TMP_0" echo "" echo "GUID=='5eca69e7-8b8d-47d8-8122-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi # Just to be sure, the same thing is checked by a slightly # different regex and using the "==" in stead of the "!=". S_TMP_0="`echo \"$S_FP_1\" | grep -E ^/tmp/`" if [ "$S_TMP_0" == "" ]; then echo "" echo "This script is flawed." echo "The temporary sandbox folder must reside in /tmp." echo "" echo "S_FP_0==$S_FP_0" echo "" echo "S_FP_1==$S_FP_1" echo "" echo "S_TMP_0==$S_TMP_0" echo "" echo "GUID=='2dafcbf1-68f7-4e41-8512-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- rm -fr $S_FP_1 if [ -e "$S_FP_1" ]; then echo "" echo "Something went wrong. The recursive deletion of the temporary folder, " echo " $S_FP_1" echo "failed." echo "GUID=='1de602b5-174e-4dee-b812-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_delete_tmp_folder_t1 #-------------------------------------------------------------------------- # Throws, if there exists a file with the same path. func_mmmv_create_folder_if_it_does_not_already_exist_t1(){ local S_FP_0="$1" # folder path #-------- if [ "$S_FP_0" == "" ]; then # Using gawk and alike to cover also cases, where # $S_FP_0==" " # is intentionally left out to avoid the overhead, but # due to some luck the mkdir exits with an error code greater than 0, # if it misses a path argument. echo "" echo "S_FP_0==\"\"" echo "GUID=='25389fb4-7fb5-4b04-b312-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- if [ -e "$S_FP_0" ]; then if [ ! -d "$S_FP_0" ]; then echo "" echo "The path that is suppose to reference either " echo "an existing folder or a non-existent folder, " echo "references a file." echo "GUID=='3d10cbe1-d097-42a5-9f12-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi #-------- mkdir -p $S_FP_0 if [ "$?" != "0" ]; then echo "" echo "mkdir for path " echo " $S_FP_0" echo "failed." echo "GUID=='15fbef3b-805a-45e2-9312-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- if [ ! -e "$S_FP_0" ]; then echo "" echo "mkdir execution succeeded, but for some other reason the folder " echo " $S_FP_0" echo "does not exist." echo "GUID=='e281e242-6195-4fd5-b312-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_create_folder_if_it_does_not_already_exist_t1 #-------------------------------------------------------------------------- S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT="" # == "" on failure # otherwise full file path func_mmmv_create_tmp_folder_t1(){ # Does not take any arguments. #-------- #func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_GUID_t1" "$1" #-------------------- S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT="" # value for failure func_mmmv_GUID_t1 if [ "$S_FUNC_MMMV_GUID_T1_RESULT" == "" ]; then echo "" echo "This script is flawed. GUID generation failed and " echo "the GUID generation function did not throw despite " echo "the fact that it should have detected its own failure." echo "GUID=='3cc92c1c-4df7-4091-8112-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- local S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" # The following few if-clauses form a short unrolled loop. The unrolling # is for simplicity, because it is Bash, where loops are nasty. if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi #---- if [ -e "$S_TMP_0" ]; then echo "" echo "This script failed to generate a locally unique path." echo "GUID=='208aa0d2-e05b-4d70-b512-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi func_mmmv_create_folder_if_it_does_not_already_exist_t1 "$S_TMP_0" if [ ! -e "$S_TMP_0" ]; then echo "" echo "mkdir for path " echo " $S_TMP_0" echo "failed." echo "GUID=='9fe0c330-c713-46b9-b502-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT="$S_TMP_0" } # func_mmmv_create_tmp_folder_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT="not set" func_mmmv_silktorrent_packager_t1_bash_get_packet_format_version_t1() { local S_FP_0="$1" # Path to the file. #---- # It's not necessary for the file to actually exist, # because this function only analyzes the file path string. # func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" if [ "$S_FP_0" == "" ]; then echo "" echo "The file path candidate must not be an empty string." echo "GUID=='2edcf528-cd73-42d3-9402-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- # The # # basename /tmp/foo/ # # returns # # foo # # That is to say, the "basename" ignores the rightmost slash. #---- local S_TMP_0="`ruby -e \"\ s='noslash';\ if(('$S_FP_0'.reverse)[0..0]=='/') then \ s='slash_present';\ end;\ puts(s);\ \"`" if [ "$S_TMP_0" != "noslash" ]; then echo "" echo "The path candidate must not end with a slash." echo "" echo " S_FP_0==$S_FP_0" echo "" echo " S_TMP_0==$S_TMP_0" echo "" echo "GUID=='22c77358-4f17-4c98-9102-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi basename $S_FP_0 1>/dev/null # to set a value to the $? in this scope if [ "$?" != "0" ]; then echo "" echo "The command " echo "" echo " basename $S_FP_0 " echo "" echo "exited with an error." echo "GUID=='fba39e45-4c8a-4b37-b402-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_TMP_0="`basename $S_FP_0`" if [ "$S_TMP_0" == "" ]; then echo "" echo "The file path candidate must be a string that " echo "is not an empty string after " echo "all of the spaces and tabs have been removed from it." echo "GUID=='90849917-3e05-40ae-a302-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT="" local S_OUT="unsupported_by_this_script_version" #-------- # In Ruby # "foo.stblob"[0..(-8)]=="foo" # "foo.stblob"[(-99)..(-1)]==nil # local S_TMP_1="`ruby -e \"\ x='$S_TMP_0'[0..(-8)];\ if(x!=nil) then\ md=x.reverse.match(/v[\\d]+/);\ if(md!=nil) then\ s_0=(md[0].to_s)[1..(-1)];\ print(s_0.sub(/^[0]+/,''));\ end;\ end;\ \"`" # echo "$S_TMP_0" # echo "$S_TMP_1" #---- if [ "$S_TMP_1" != "" ]; then S_OUT="silktorrent_packet_format_version_$S_TMP_1" fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT="$S_OUT" } # func_mmmv_silktorrent_packager_t1_bash_get_packet_format_version_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT="not set" func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- func_mmmv_silktorrent_packager_t1_bash_get_packet_format_version_t1 "$S_FP_0" local S_PACKET_FORMAT="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT" if [ "$S_PACKET_FORMAT" == "unsupported_by_this_script_version" ]; then echo "" echo "There exists a possibility that the " echo "Silktorrent packet candidate is actually OK, but " echo "this is an older version of the Silktorrent implementaiton and " echo "the older version does not support " echo "newer Silktorrent packet formats. " echo "The file path of the Silktorrent packet candidate:" echo "" echo " $S_FP_0" echo "" echo "GUID=='3e96d920-02dc-43a2-a202-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_TMP_1="" if [ "$S_PACKET_FORMAT" == "silktorrent_packet_format_version_1" ]; then func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1 "$S_FP_0" #echo "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT" S_TMP_1="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT" fi #---- if [ "$S_TMP_1" == "" ]; then echo "" echo "This script is flawed." echo "It should have thrown before the control flow reaches this line." echo "GUID=='95af1748-4736-48dd-b102-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_TMP_0="`basename $S_FP_0`" # The S_TMP_0 must be evaluated # after the various functions to # counter a situation, where # the S_TMP_0 is overwritten # by the name-calc function # or by one of the sub-functions # of the name-calc function. # The flaw occurs, when the # S_TMP_0 is used within the # name-calc function without # declaring it to be a local # variable. #-------- #echo "S_FP_0==$S_FP_0" #echo "S_TMP_0==$S_TMP_0" #echo "S_TMP_1==$S_TMP_1" local S_OUT="" if [ "$S_TMP_1" == "$S_TMP_0" ]; then S_OUT="verification_passed" else S_OUT="verification_failed" fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT="$S_OUT" } # func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_test_1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- echo "" #---- func_mmmv_tigerhash_t1 "$S_FP_0" echo " Tiger: $S_FUNC_MMMV_TIGERHASH_T1_RESULT" func_mmmv_whirlpoolhash_t1 "$S_FP_0" echo " Whirlpool: $S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT" func_mmmv_sha256_t1 "$S_FP_0" echo " SHA256: $S_FUNC_MMMV_SHA256_T1_RESULT" func_mmmv_filesize_t1 "$S_FP_0" echo " file size: $S_FUNC_MMMV_FILESIZE_T1_RESULT" #---- echo "" } # func_mmmv_silktorrent_packager_t1_bash_test_1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_wrap_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- func_mmmv_create_tmp_folder_t1 if [ "$S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT" == "" ]; then echo "This script is flawed, because the folder " echo "creation function should have thrown " echo "before the control flow reaches this branch." echo "GUID=='86a9f465-fc12-4f17-b2f1-83f2c08160e7'" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_FP_TMP_0="$S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT" if [ ! -e "$S_FP_TMP_0" ]; then echo "This script is flawed." echo "May be some other thread deleted the folder or" echo "the folder creation function returned a valid path, but" echo "did not actually create the folder that it was supposed create." echo "S_FP_TMP_0==$S_FP_TMP_0" echo "GUID=='58b79d45-c739-4cf0-a2f1-83f2c08160e7'" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_FP_TMP_SILKTORRENT_PACKET="$S_FP_TMP_0/silktorrent_packet" local S_FP_TMP_SILKTORRENT_PACKET_TAR="$S_FP_TMP_0/silktorrent_packet.tar" local S_FP_TMP_PAYLOAD="$S_FP_TMP_SILKTORRENT_PACKET/payload" local S_FP_TMP_HEADER="$S_FP_TMP_SILKTORRENT_PACKET/header" local S_FP_TMP_HEADER_SALT_TXT="$S_FP_TMP_HEADER/silktorrent_salt.txt" func_mmmv_create_folder_if_it_does_not_already_exist_t1 "$S_FP_TMP_PAYLOAD" # uses mkdir -p func_mmmv_create_folder_if_it_does_not_already_exist_t1 "$S_FP_TMP_HEADER" #-------- # Salting makes sure that it is not possible to # conclude the payload bitstream from the # Silktorrent packet (file) name, forcing censoring # parties to download packages # that they are not looking for and allowing # censorship dodgers to publish the same payload bitstream # in multiple, differet, Silktorrent packages. func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT #-------- # The file size/Silktorrent pakcket size must also be salted. ruby -e \ "Random.new_seed;i=0;\ puts '';\ rand(10**6).times{\ i=i+1;\ print(rand(10**6).to_s(16));\ if((i%10)==0) then \ puts '';\ i=0;\ end;\ }" \ >> $S_FP_TMP_HEADER_SALT_TXT #-------- cp -f $S_FP_0 $S_FP_TMP_PAYLOAD/ if [ "$?" != "0" ]; then echo "" echo "The command " echo "" echo " cp -f \$S_FP_0 \$S_FP_TMP_PAYLOAD/ " echo "" echo "failed. Either this script is flawed or something else went wrong. " echo "" echo " S_FP_0==$S_FP_0" echo "" echo " S_FP_TMP_PAYLOAD=$S_FP_TMP_PAYLOAD" echo "" echo "GUID=='82573133-665f-4630-93f1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_FP_TMP_ORIG_0="`pwd`" cd $S_FP_TMP_SILKTORRENT_PACKET/.. tar -cf $S_FP_TMP_SILKTORRENT_PACKET_TAR ./`basename $S_FP_TMP_SILKTORRENT_PACKET` 2>/dev/null cd $S_FP_TMP_ORIG_0 if [ "$?" != "0" ]; then echo "" echo "The command " echo "" echo " tar -cf \$S_FP_TMP_SILKTORRENT_PACKET_TAR \$S_FP_TMP_SILKTORRENT_PACKET " echo "" echo "failed. Either this script is flawed or something else went wrong. " echo "" echo " S_FP_TMP_SILKTORRENT_PACKET=$S_FP_TMP_SILKTORRENT_PACKET" echo "" echo " S_FP_TMP_SILKTORRENT_PACKET_TAR==$S_FP_TMP_SILKTORRENT_PACKET_TAR" echo "" echo "GUID=='36819d11-7f01-4740-a4f1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1 "$S_FP_TMP_SILKTORRENT_PACKET_TAR" local S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME="$S_FP_ORIG/$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT" mv $S_FP_TMP_SILKTORRENT_PACKET_TAR $S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME 2>/dev/null if [ "$?" != "0" ]; then echo "" echo "Something went wrong." echo "The renaming and copying of " echo " $S_FP_TMP_SILKTORRENT_PACKET_TAR " echo "to " echo " $S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME " echo "failed." echo "GUID=='db65c191-4ba3-4672-b3f1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi if [ ! -e "$S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME" ]; then echo "" echo "Something went wrong." echo "The renaming and copying of " echo "" echo " $S_FP_TMP_SILKTORRENT_PACKET_TAR " echo "" echo "to " echo "" echo " $S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME " echo "" echo "failed. The mv command succeed, but for some reason " echo "the destination file does not exist." echo "GUID=='83fae955-7e6b-4a80-85f1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- func_mmmv_delete_tmp_folder_t1 "$S_FP_TMP_0" if [ -e "$S_FP_TMP_0" ]; then echo "" echo "Something went wrong." echo "The deletion of the temporary folder, " echo "" echo " $S_FP_TMP_0" echo "" echo "failed." echo "GUID=='2dd1f121-5407-48a0-b2f1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_silktorrent_packager_t1_bash_wrap_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_unwrap_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1 "$S_FP_0" local S_PACKET_FORMAT="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT" if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT" != "verification_passed" ]; then echo "" echo "The Silktorrent packet candidate, " echo "" echo " $S_FP_0" echo "" echo "failed Silktorrent packet name verification." echo "There exists a possibility that the " echo "Silktorrent packet candidate is actually OK, but " echo "this is an older version of the Silktorrent implementaiton and " echo "this, the older, version does not support " echo "newer Silktorrent packet formats. " echo "GUID=='859bd022-e09e-4d45-94e1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local SB_FORMAT_BRANCH_EXISTS_IN_THIS_FUNCTION="f" if [ "$S_PACKET_FORMAT" == "silktorrent_packet_format_version_1" ]; then SB_FORMAT_BRANCH_EXISTS_IN_THIS_FUNCTION="t" #---- local S_FP_TMP_SILKTORRENT_PACKET="`pwd`/silktorrent_packet" if [ -e $S_FP_TMP_SILKTORRENT_PACKET ]; then echo "" echo "To avoid accidental deletion of files, " echo "and some other types of flaws, " echo "there is a requirement that the folder " echo "" echo " ./silktorrent_packet" echo "" echo "must be explicitly deleted before calling this script." echo "GUID=='c2967e69-c2b9-4774-91e1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- tar -xf $S_FP_0 2>/dev/null if [ "$?" != "0" ]; then echo "" echo "Something went wrong. The command " echo "" echo " tar -xf $S_FP_0" echo "" echo "exited with an error code, which is $? ." echo "GUID=='aef74f24-a969-470f-85e1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi rm -f $S_FP_TMP_SILKTORRENT_PACKET/header/silktorrent_salt.txt #---- if [ ! -e $S_FP_TMP_SILKTORRENT_PACKET ]; then echo "" echo "Something went wrong. " echo "The unpacking of the Silktorrent packet with the path of " echo "" echo " $S_FP_0" echo "" echo "failed. The folder \"silktorrent_packet\" " echo "is missing after the \"tar\" exited without any errors." echo "GUID=='b6ee795a-4468-480f-a2e1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi # silktorrent_packet_format_version_1 #-------- if [ "$SB_FORMAT_BRANCH_EXISTS_IN_THIS_FUNCTION" != "t" ]; then echo "" echo "This script is flawed." echo "There is at least one branch missing from this function." echo "GUID=='d0662736-c1b5-4902-a1e1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- } # func_mmmv_silktorrent_packager_t1_bash_unwrap_t1 #-------------------------------------------------------------------------- # The S_SILKTORRENT_PACKAGER_T1_ACTION="" # is global to allow it to be used # in the error messages of different functions. func_mmmv_silktorrent_packager_t1_bash_determine_action() { local S_ARGV_0="$1" # Ruby style ARGV, 0 is the first command line argument. local S_ARGV_1="$2" local S_ARGV_2="$3" local S_ARGV_3="$4" #-------- if [ "$S_ARGV_0" == "" ]; then func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #---- cd $S_FP_ORIG exit 1 # exit with an error fi #---- local SB_0="f" if [ "$S_ARGV_0" == "help" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "--help" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "-?" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "-h" ]; then SB_0="t" fi #---- if [ "$SB_0" == "t" ]; then func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #---- cd $S_FP_ORIG exit 0 # exit without an error fi #-------------------------- # Start of actions that require the existance of at least one file. local S_TMP_0="" local S_TMP_1="" #---- S_TMP_0="wrap" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" fi if [ "$S_ARGV_0" == "pack" ]; then # alias S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" fi #---- S_TMP_0="unwrap" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" fi if [ "$S_ARGV_0" == "unpack" ]; then # alias S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" fi #---- S_TMP_0="verify" # checks the matche between the blob and the file name if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" fi #---- S_TMP_0="test_hash_t1" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" fi #-------- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "" ]; then func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #---- cd $S_FP_ORIG exit 1 # exit with an error fi # The action name test above has to be before the func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_ARGV_1" # because otherwise the texts of the # error messages are incorrect. Indeed, it does # introduce the following duplicating series of if-clauses, # but it's all in the name of producing helpful error # messages at different situations. #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "wrap" ]; then func_mmmv_silktorrent_packager_t1_bash_wrap_t1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "unwrap" ]; then func_mmmv_silktorrent_packager_t1_bash_unwrap_t1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "verify" ]; then func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1 "$S_ARGV_1" echo "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "test_hash_t1" ]; then func_mmmv_silktorrent_packager_t1_bash_test_1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #-------------------------- echo "" echo "This bash script is flawed. The control flow " echo "should have never reached this line." echo "GUID=='87e4c185-e25f-4047-a8e1-83f2c08160e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with an error } # func_mmmv_silktorrent_packager_t1_bash_determine_action func_mmmv_silktorrent_packager_t1_bash_determine_action $1 $2 $3 $4 $5 $6 $7 #-------------------------------------------------------------------------- #-------------------------------------------------------------------------- cd $S_FP_ORIG exit 0 # #========================================================================== # Fragments of comments and code that might find use some times later: #-------------------------------------------------------------------------- # # max 55 characters --- package suggested deprecation date in nanoseconds # relative to the Unix Epoch, # written in base 10. It can be negative. # rgx_in_ruby=/t((y[-]?[\d]+)|n)[_]/ # echo "v0034_s2342_tn_" | gawk '{ gsub(/_/, "_\n"); print }' | \ # gawk '/^t(y[-]?[0-9]+|n)_/ {printf "%s",$1 }' | # gawk '{gsub(/[tyn_]/,"");printf "%s", $1 }' # # #========================================================================== |
Added milestone_releases/silktorrent_packager_t1_2016_07_16.bash version [6caf32f071].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 2305 2306 2307 2308 2309 2310 2311 2312 2313 2314 2315 2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 2327 2328 2329 2330 2331 2332 2333 2334 2335 2336 2337 2338 2339 2340 2341 2342 2343 2344 2345 2346 2347 2348 2349 2350 2351 2352 2353 2354 2355 2356 2357 2358 2359 2360 2361 2362 2363 2364 2365 2366 2367 2368 2369 2370 2371 2372 2373 2374 2375 2376 2377 2378 2379 2380 2381 2382 2383 2384 2385 2386 2387 2388 2389 2390 2391 2392 2393 2394 2395 2396 2397 2398 2399 2400 2401 2402 2403 2404 2405 2406 2407 2408 2409 2410 2411 2412 2413 2414 2415 2416 2417 2418 2419 2420 2421 2422 2423 2424 2425 2426 2427 2428 2429 2430 2431 2432 2433 2434 2435 2436 2437 2438 2439 2440 2441 2442 2443 2444 2445 2446 2447 2448 2449 2450 2451 2452 2453 2454 2455 2456 2457 2458 2459 2460 2461 2462 2463 2464 2465 2466 2467 2468 2469 2470 2471 2472 2473 2474 2475 2476 2477 2478 2479 2480 2481 2482 2483 2484 2485 2486 2487 2488 2489 2490 2491 2492 2493 2494 2495 2496 |
#!/usr/bin/env bash #========================================================================== # # Copyright 2016, martin.vahi@softf1.com that has an # Estonian personal identification code of 38108050020. # All rights reserved. # # Redistribution and use in source and binary forms, with or # without modification, are permitted provided that the following # conditions are met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # * Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer # in the documentation and/or other materials provided with the # distribution. # * Neither the name of the Martin Vahi nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #========================================================================== S_FP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" S_FP_ORIG="`pwd`" S_TIMESTAMP="`date +%Y`_`date +%m`_`date +%d`_T_`date +%H`h_`date +%M`min_`date +%S`s" #-------------------------------------------------------------------------- # Settings: S_SCRIPT_VERSION="2016_07_16_a" #-------------------------------------------------------------------------- SB_TMP_FOLDER_EXISTS="f" # to omit one useless and slow file system access S_FP_TMP_FOLDER="" func_mmmv_silktorrent_packager_t1_exit_without_any_errors() { local S_0="" local S_1="" if [ "$SB_TMP_FOLDER_EXISTS" == "t" ]; then S_0= fi exit 0 # exit without an error } # func_mmmv_silktorrent_packager_t1_exit_without_any_errors #-------------------------------------------------------------------------- S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="" func_mmmv_operating_system_type_t1() { if [ "$S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT" == "" ]; then S_TMP_0="`uname -a | grep -E [Ll]inux`" if [ "$S_TMP_0" != "" ]; then S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="Linux" else S_TMP_0="`uname -a | grep BSD `" if [ "$S_TMP_0" != "" ]; then S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="BSD" else S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT="undetermined" fi fi fi } # func_mmmv_operating_system_type_t1 #-------------------------------------------------------------------------- func_mmmv_operating_system_type_t1 if [ "$S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT" != "Linux" ]; then if [ "$S_FUNC_MMMV_OPERATING_SYSTEM_TYPE_T1_RESULT" != "BSD" ]; then echo "" echo " The classical command line utilities at " echo " different operating systems, for example, Linux and BSD," echo " differ. This script is designed to run only on " echo " Linux and some BSD variants." echo " If You are willing to risk that some of Your data " echo " is deleted and/or Your operating system instance" echo " becomes permanently flawed, to the point that " echo " it will not even boot, then You may edit the Bash script that " echo " displays this error message by modifying the test that " echo " checks for the operating system type." echo "" echo " If You do decide to edit this Bash script, then " echo " a recommendation is to test Your modifications " echo " within a virtual machine or, if virtual machines are not" echo " an option, as some new operating system user that does not have " echo " any access to the vital data/files." echo " GUID=='33d63375-7582-49dd-aa88-71b3900170e7'" echo "" echo " Aborting script without doing anything." echo "" exit 1 # exit with error fi fi #-------------------------------------------------------------------------- SB_EXISTS_ON_PATH_T1_RESULT="f" func_sb_exists_on_path_t1 () { local S_NAME_OF_THE_EXECUTABLE_1="$1" # first function argument #-------- # Function calls like # # func_sb_exists_on_path_t1 "" # func_sb_exists_on_path_t1 " " # func_sb_exists_on_path_t1 "ls ps" # contains a space # # are not allowed. if [ "$S_NAME_OF_THE_EXECUTABLE_1" == "" ] ; then echo "" echo "The Bash function " echo "" echo " func_sb_exists_on_path_t1 " echo "" echo "is not designed to handle an argument that " echo "equals with an empty string." echo "GUID=='39128b22-8ba8-4037-bb88-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_1\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_1" != "$S_TMP_0" ] ; then echo "" echo "The Bash function " echo "" echo " func_sb_exists_on_path_t1 " echo "" echo "is not designed to handle an argument value that contains " echo "spaces or tabulation characters." echo "The received value in parenthesis:($S_NAME_OF_THE_EXECUTABLE_1)." echo "GUID=='47c83d31-51ea-4119-ae88-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_1 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" else SB_EXISTS_ON_PATH_T1_RESULT="t" fi } # func_sb_exists_on_path_t1 func_assert_exists_on_path_t2 () { local S_NAME_OF_THE_EXECUTABLE_1="$1" # first function argument local S_NAME_OF_THE_EXECUTABLE_2="$2" # optional argument local S_NAME_OF_THE_EXECUTABLE_3="$3" # optional argument local S_NAME_OF_THE_EXECUTABLE_4="$4" # optional argument #-------- # Function calls like # # func_assert_exists_on_path_t2 "" "" "ls" # func_assert_exists_on_path_t2 "ls" "" "ps" # # are not allowed by the spec of this function, but it's OK to call # # func_assert_exists_on_path_t2 "ls" "" # func_assert_exists_on_path_t2 "ls" "ps" "" # func_assert_exists_on_path_t2 "ls" "" "" "" # # local SB_THROW="f" if [ "$S_NAME_OF_THE_EXECUTABLE_1" == "" ] ; then SB_THROW="t" else if [ "$S_NAME_OF_THE_EXECUTABLE_2" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_3" != "" ] ; then SB_THROW="t" fi if [ "$S_NAME_OF_THE_EXECUTABLE_4" != "" ] ; then SB_THROW="t" fi else if [ "$S_NAME_OF_THE_EXECUTABLE_3" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" != "" ] ; then SB_THROW="t" fi fi fi fi #---- if [ "$SB_THROW" == "t" ] ; then echo "" echo "The Bash function " echo "" echo " func_assert_exists_on_path_t2 " echo "" echo "is not designed to handle series of arguments, where " echo "empty strings preced non-empty strings." echo "GUID=='1ae7a9bd-e472-4344-8188-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi if [ "$5" != "" ] ; then echo "" echo "This Bash function is designed to work with at most 4 input arguments" echo "GUID=='05af1c56-ee4e-485e-8388-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # Function calls like # # func_assert_exists_on_path_t2 " " # func_assert_exists_on_path_t2 "ls ps" # contains a space # # are not allowed. SB_THROW="f" local S_TMP_0="" local S_TMP_1="" local S_TMP_2="" #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_1\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_1" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_1" S_TMP_2="GUID=='eb3a821d-b300-4128-8588-71b3900170e7'" fi fi #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_2\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_2" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_2" S_TMP_2="GUID=='071590a7-41d2-467f-8888-71b3900170e7'" fi fi #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_3\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_3" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_3" S_TMP_2="GUID=='1beff945-939d-48f9-a178-71b3900170e7'" fi fi #---- if [ "$SB_THROW" == "f" ] ; then S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_4\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_4" != "$S_TMP_0" ] ; then SB_THROW="t" S_TMP_1="$S_NAME_OF_THE_EXECUTABLE_4" S_TMP_2="GUID=='9bf9ca59-4c78-4fb6-8378-71b3900170e7'" fi fi #-------- if [ "$SB_THROW" == "t" ] ; then echo "" echo "The Bash function " echo "" echo " func_assert_exists_on_path_t2 " echo "" echo "is not designed to handle an argument value that contains " echo "spaces or tabulation characters." echo "The unaccepted value in parenthesis:($S_TMP_1)." echo "Branch $S_TMP_2." echo "GUID=='24b11e55-b4ea-419c-8578-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi SB_THROW="f" # Just a reset, should I forget to reset it later. #--------------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_1 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_2" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_3" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" == "" ] ; then echo "" echo "This bash script requires the \"$S_NAME_OF_THE_EXECUTABLE_1\" to be on the PATH." echo "GUID=='62b54420-f8c0-4d4b-b278-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi fi else return # at least one of the programs was available at the PATH fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_2 2>/dev/null\`" S_TMP_1="" S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_3" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" == "" ] ; then echo "" echo "This bash script requires that either \"$S_NAME_OF_THE_EXECUTABLE_1\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_2\" is available on the PATH." echo "GUID=='aa80d32e-c312-40b0-8478-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi else return # at least one of the programs was available at the PATH fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_3 2>/dev/null\`" S_TMP_1="" S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then if [ "$S_NAME_OF_THE_EXECUTABLE_4" == "" ] ; then echo "" echo "This bash script requires that either \"$S_NAME_OF_THE_EXECUTABLE_1\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_2\" or \"$S_NAME_OF_THE_EXECUTABLE_3\" " echo "is available on the PATH." echo "GUID=='3ae0cfcc-0a10-45c5-8168-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi else return # at least one of the programs was available at the PATH fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_4 2>/dev/null\`" S_TMP_1="" S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then echo "" echo "This bash script requires that either \"$S_NAME_OF_THE_EXECUTABLE_1\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_2\" or \"$S_NAME_OF_THE_EXECUTABLE_3\" or " echo " \"$S_NAME_OF_THE_EXECUTABLE_4\" is available on the PATH." echo "GUID=='64dba5fe-7564-4666-a468-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error else return # at least one of the programs was available at the PATH fi #-------- } # func_assert_exists_on_path_t2 func_assert_exists_on_path_t2 "bash" # this is a bash script, but it does not hurt func_assert_exists_on_path_t2 "basename" # for extracting file names from full paths func_assert_exists_on_path_t2 "cat" # opposite to split func_assert_exists_on_path_t2 "sha256sum" "sha256" "rhash" func_assert_exists_on_path_t2 "tigerdeep" "rhash" func_assert_exists_on_path_t2 "whirlpooldeep" "rhash" func_assert_exists_on_path_t2 "tar" #-------- func_assert_exists_on_path_t2 "file" # for checking the MIME type of the potential tar file func_assert_exists_on_path_t2 "filesize" "ruby" func_assert_exists_on_path_t2 "gawk" #func_assert_exists_on_path_t2 "grep" #func_assert_exists_on_path_t2 "readlink" func_assert_exists_on_path_t2 "ruby" # anything over/equal v.2.1 will probably do #func_assert_exists_on_path_t2 "split" # for cutting files #func_assert_exists_on_path_t2 "test" func_assert_exists_on_path_t2 "uname" # to check the OS type func_assert_exists_on_path_t2 "uuidgen" "uuid" # GUID generation on Linux and BSD #func_assert_exists_on_path_t2 "xargs" func_assert_exists_on_path_t2 "wc" # for checking hash lengths #-------------------------------------------------------------------------- func_mmmv_exc_hash_function_input_verification_t1() { local S_NAME_OF_THE_BASH_FUNCTION="$1" # The name of the Bash function. local S_FP_2_AN_EXISTING_FILE="$2" # The first argument of the Bash function. #-------- if [ "$S_NAME_OF_THE_BASH_FUNCTION" == "" ] ; then echo "" echo "The implementation of the function that " echo "calls the " echo "" echo " func_mmmv_exc_hash_function_input_verification_t1" echo "" echo "is flawed. The call to the " echo "" echo " func_mmmv_exc_hash_function_input_verification_t1" echo "" echo "misses the first argument or the first argument is an empty string." echo "GUID=='b91da738-c651-4c2a-8b68-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`printf \"$S_NAME_OF_THE_BASH_FUNCTION\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_BASH_FUNCTION" != "$S_TMP_0" ] ; then echo "" echo "The implementation of the function that " echo "calls the " echo "" echo " func_mmmv_exc_hash_function_input_verification_t1" echo "" echo "is flawed. Function names are not allowed to contain spaces or tabs." echo "GUID=='405b2523-bd54-463b-9368-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # Function calls like # # <function name> "" # <function name> " " # # are not allowed. local S_TMP_0="`printf \"$S_FP_2_AN_EXISTING_FILE\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_TMP_0" == "" ] ; then echo "" echo "The Bash function " echo "" echo " $S_NAME_OF_THE_BASH_FUNCTION" echo "" echo "is not designed to handle an argument that " echo "equals with an empty string or a series of spaces and tabs." echo "GUID=='7118e122-ef7a-43e6-af68-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ ! -e $S_FP_2_AN_EXISTING_FILE ] ; then echo "" echo "The file " echo "" echo " $S_FP_2_AN_EXISTING_FILE " echo "" echo "is missing or it is a broken link." echo "GUID=='1c0b3101-7922-42b3-ac68-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi if [ -d $S_FP_2_AN_EXISTING_FILE ] ; then echo "" echo "The file path " echo "" echo " $S_FP_2_AN_EXISTING_FILE " echo "" echo "references a folder, but a file is expected." echo "GUID=='04596259-93f4-45f3-8368-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- # At this line the verifications have all passed. #-------------------- } # func_mmmv_exc_hash_function_input_verification_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_GUID_T1_RESULT="not_yet_set" S_FUNC_MMMV_GUID_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_GUID_t1() { # Does not take any arguments. #-------- #func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_GUID_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="uuidgen" # Linux version func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_GUID_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="uuid" # BSD version func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_GUID_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "" ] ; then echo "" echo "All of the GUID generation implementations that this script " echo "is capable of using (uuidgen, uuid) " echo "are missing from the PATH." echo "GUID=='25286e58-fb76-41f5-8568-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='31132449-5de3-431f-a258-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_GUID_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "uuidgen" ]; then S_TMP_0="`uuidgen`" if [ "$?" != "0" ]; then echo "" echo "The console application \"uuidgen\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`uuidgen`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='2d8df7d1-9ef0-4531-b558-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- S_FUNC_MMMV_GUID_T1_RESULT="$S_TMP_0" fi #-------------------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "uuid" ]; then S_TMP_0="`uuid`" if [ "$?" != "0" ]; then echo "" echo "The console application \"uuid\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`uuid`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='7616c855-15e3-4331-a158-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- S_FUNC_MMMV_GUID_T1_RESULT="$S_TMP_0" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_GUID_T1_RESULT\" | wc -m `" S_TMP_1="36" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the GUID specification, IETF RFC 4122, " echo "the lenght of the GUID is " echo "$S_TMP_1 characters, but the result of the " echo "" echo " func_mmmv_GUID_t1" echo "" echo "is something else. The flawed GUID candidate in parenthesis:" echo "($S_FUNC_MMMV_GUID_T1_RESULT)" echo "" echo "The lenght candidate of the flawed GUID candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='7a226a41-91ce-4ab9-a258-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_GUID_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SHA256_T1_RESULT="not_yet_set" S_FUNC_MMMV_SHA256_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_sha256_t1() { # requires also ruby and gawk local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_sha256_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="sha256sum" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SHA256_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="rhash" # part of the BSD package collection in 2016 func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SHA256_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="sha256" # usually available on BSD func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SHA256_T1_MODE="$S_TMP_0" fi fi # The console application "rhash" is preferred to the "sha256" # because the "rhash" output can be simply processed with # "gawk", which takes over 5x less memory than the Ruby interpreter, # not to mention the initialization cost of the Ruby interpreter. #-------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "" ] ; then echo "" echo "All of the SHA-256 implementations that this script " echo "is capable of using (sha256sum, rhash, sha256) " echo "are missing from the PATH." echo "GUID=='4aef5146-0d53-414e-b258-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='852b0558-3ebd-4de9-a158-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_SHA256_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "sha256sum" ]; then S_TMP_0="`sha256sum $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"sha256sum\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`sha256sum $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='611e5732-c1cc-480a-a458-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- # The gawk is used for selecting the 1. column because # according to the # # echo "aa bb" | time -v gawk '{printf $1}' # # the gawk takes about 3MiB, which is far less than the # # time -v ruby -e "puts 'hi'" # # indicated 16MiB # S_FUNC_MMMV_SHA256_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "rhash" ]; then S_TMP_0="`rhash --sha256 $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"rhash\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`rhash --sha256 $S_FP_2_AN_EXISTING_FILE `" echo "----console--outut--citation--end-------" echo "" echo "GUID=='f377bf45-4ea1-4fe6-9148-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_SHA256_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_SHA256_T1_MODE" == "sha256" ]; then #---- S_FUNC_MMMV_SHA256_T1_RESULT=\ "`S_TMP_0=\"\`sha256 $S_FP_2_AN_EXISTING_FILE\`\" ruby -e \"s0=ENV['S_TMP_0'].to_s;ix_0=s0.index(') = ');print s0[(ix_0+4)..(-1)]\" 2>/dev/null`" #---- if [ "$?" != "0" ]; then echo "" echo "The console application \"sha256\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo \ "`S_TMP_0=\"\`sha256 $S_FP_2_AN_EXISTING_FILE\`\" ruby -e \"s0=ENV['S_TMP_0'].to_s;ix_0=s0.index(') = ');print s0[(ix_0+4)..(-1)]\"`" echo "----console--outut--citation--end-------" echo "" echo "GUID=='22691ef3-f14b-4f46-bb48-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_SHA256_T1_RESULT\" | wc -m `" S_TMP_1="64" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the specification of the SHA-256 hash algorithm" echo "the lenght of the SHA-256 hash is " echo "$S_TMP_1 hexadecimal characters, but the result of the " echo "" echo " func_mmmv_sha256_t1" echo "" echo "is something else. The flawed hash candidate in parenthesis:" echo "($S_FUNC_MMMV_SHA256_T1_RESULT)" echo "" echo "The lenght candidate of the flawed hash candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='3e6b48bd-8a81-4f15-b148-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_sha256_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_TIGERHASH_T1_RESULT="not_yet_set" S_FUNC_MMMV_TIGERHASH_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_tigerhash_t1() { # requires also ruby and gawk local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_tigerhash_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="tigerdeep" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_TIGERHASH_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="rhash" # part of the BSD package collection in 2016 func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_TIGERHASH_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "" ] ; then echo "" echo "All of the Tiger hash implementations that this script " echo "is capable of using (tigerdeep, rhash) " echo "are missing from the PATH." echo "GUID=='2bed8ba2-1f17-43d0-8b48-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='401fae19-71e9-4c52-b148-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_TIGERHASH_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "tigerdeep" ]; then S_TMP_0="`tigerdeep $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"tigerdeep\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`tigerdeep $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='2bd1ed5f-5735-45d7-8248-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_TIGERHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_TIGERHASH_T1_MODE" == "rhash" ]; then S_TMP_0="`rhash --tiger $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"rhash\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`rhash --tiger $S_FP_2_AN_EXISTING_FILE `" echo "----console--outut--citation--end-------" echo "" echo "GUID=='51e5a1c5-292f-4bf1-8948-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_TIGERHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_TIGERHASH_T1_RESULT\" | wc -m `" S_TMP_1="48" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the specification of the Tiger hash algorithm" echo "the lenght of the Tiger hash is " echo "$S_TMP_1 hexadecimal characters, but the result of the " echo "" echo " func_mmmv_tigerhash_t1" echo "" echo "is something else. The flawed hash candidate in parenthesis:" echo "($S_FUNC_MMMV_TIGERHASH_T1_RESULT)" echo "" echo "The lenght candidate of the flawed hash candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='30fcf82d-5cb9-4c96-9148-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_tigerhash_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="not_yet_set" S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_whirlpoolhash_t1() { # requires also ruby and gawk local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_whirlpoolhash_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="whirlpooldeep" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="rhash" # part of the BSD package collection in 2016 func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "" ] ; then echo "" echo "All of the Whirlpool hash implementations that this script " echo "is capable of using (whirlpooldeep, rhash) " echo "are missing from the PATH." echo "GUID=='2a608859-8310-44b4-8338-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='48097a1c-5e76-4dcc-b538-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "whirlpooldeep" ]; then S_TMP_0="`whirlpooldeep $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"whirlpooldeep\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`whirlpooldeep $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='46922d93-033d-44be-a438-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_WHIRLPOOLHASH_T1_MODE" == "rhash" ]; then S_TMP_0="`rhash --whirlpool $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"rhash\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`rhash --whirlpool $S_FP_2_AN_EXISTING_FILE `" echo "----console--outut--citation--end-------" echo "" echo "GUID=='22eb6a73-6762-4aa1-9538-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT\" | wc -m `" S_TMP_1="128" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the specification of the Whirlpool hash algorithm" echo "the lenght of the Tiger hash is " echo "$S_TMP_1 hexadecimal characters, but the result of the " echo "" echo " func_mmmv_whirlpoolhash_t1" echo "" echo "is something else. The flawed hash candidate in parenthesis:" echo "($S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT)" echo "" echo "The lenght candidate of the flawed hash candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='712dc4a3-3fc9-40ca-9338-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_whirlpoolhash_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_FILESIZE_T1_RESULT="not_yet_set" S_FUNC_MMMV_FILESIZE_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_filesize_t1() { local S_FP_2_AN_EXISTING_FILE="$1" # first function argument #-------- func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_filesize_t1" "$1" #-------------------- # Mode selection: if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="filesize" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_FILESIZE_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="ruby" # helps on BSD func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_FILESIZE_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "" ] ; then echo "" echo "All of the applications that this function is " echo "capable of using for finding out file size (filesize, ruby)" echo "are missing from the PATH." echo "GUID=='3c1c971a-a8b6-4c5f-a238-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='a54cc438-f608-4e38-b138-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_FILESIZE_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "filesize" ]; then S_TMP_0="`filesize $S_FP_2_AN_EXISTING_FILE 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"filesize\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`filesize $S_FP_2_AN_EXISTING_FILE`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='556a2e84-9d18-4e09-a338-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_FILESIZE_T1_RESULT="`echo \"$S_TMP_0\" | gawk '{printf $1}'`" fi #-------------------- if [ "$S_FUNC_MMMV_FILESIZE_T1_MODE" == "ruby" ]; then S_TMP_0="`ruby -e \"printf(File.size('$S_FP_2_AN_EXISTING_FILE').to_s)\" 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"ruby\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`ruby -e \"printf(File.size('$S_FP_2_AN_EXISTING_FILE').to_s)\"`" echo "----console--outut--citation--end-------" echo "" echo "GUID=='855f9c25-6bb5-4f85-9428-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_FILESIZE_T1_RESULT="$S_TMP_0" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_FILESIZE_T1_RESULT\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" local SB_THROW="f" if [ "$S_TMP_0" != "$S_FUNC_MMMV_FILESIZE_T1_RESULT" ]; then SB_THROW="t" else if [ "$S_FUNC_MMMV_FILESIZE_T1_RESULT" == "" ]; then SB_THROW="t" fi fi #---- if [ "$SB_THROW" == "t" ]; then echo "" echo "The result of the " echo "" echo " func_mmmv_filesize_t1" echo "" echo "for " echo "" echo "($S_FUNC_MMMV_FILESIZE_T1_RESULT)" echo "" echo "either contain spaces, tabs or is an empty string," echo "which is wrong, because even a file with the size of 0 " echo "should have a file size of \"0\", which is not an empty string." echo "GUID=='1b8bc205-8c7e-40a4-a528-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_filesize_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1() { echo "" echo "Command line format: " echo "" echo "<the name of this script> ARGLIST " echo "" echo " ARGLIST :== help | WRAP | UNWRAP | RUN_SELFTEST | VERIFY |" echo " VERIFY_PACKET_NAME_FORMAT_V1 | version " echo "" echo " WRAP :== wrap <file path> " echo " UNWRAP :== unwrap <file path> " echo " RUN_SELFTEST :== test_hash_t1 <file path> " echo " VERIFY :== verify <file path> " echo "" echo " VERIFY_PACKET_NAME_FORMAT_V1 :== verify_packet_name_format_v1 X<packet name " echo " candidate string>X" echo "" echo "" echo "If this API is used correctly and there are no other " echo "reasons for the failure of this script, then " echo "all of the verification commands exit with error code 0 " echo "regardless of whether the verification fails or passes." echo "All verification commands return a string that " echo "belongs to the set {\"verification_passed\", " echo " \"verification_failed\"}." echo "" echo "" echo "" } # func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1() { local S_FP_0="$1" # Path to the file. #-------- if [ "$S_FP_0" == "" ]; then echo "" echo "The 2. console argument is expected to be " echo "a path to a file, but currently " echo "the 2. console argument is missing." echo "GUID=='1eee6d46-d91c-4bfb-a228-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ ! -e "$S_FP_0" ]; then if [ -h "$S_FP_0" ]; then echo "" echo "The file path " echo "" echo " $S_FP_0" echo "" echo "is a path of a broken symlink, but symlinks " echo "are not supported at all." echo "The reason, why symlinks to files are not supported is that " echo "the file size of symlinks can differ from " echo "the file size of the target of the symlink." echo "GUID=='4c68cb15-2c2b-49fd-9218-71b3900170e7'" echo "" else echo "" echo "The file with the path of " echo "" echo " $S_FP_0" echo "" echo "does not exist." echo "GUID=='428ff042-efd8-4566-a318-71b3900170e7'" echo "" fi #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ -d "$S_FP_0" ]; then if [ -h "$S_FP_0" ]; then echo "" echo "The path " echo "" echo " $S_FP_0" echo "" echo "references a symlink that references folder, but " echo "a file is expected." echo "GUID=='b2d2a237-9fcb-46fe-8318-71b3900170e7'" echo "" else echo "" echo "The path " echo "" echo " $S_FP_0" echo "" echo "references a folder, but it is expected to " echo "to reference a file." echo "GUID=='1dd79224-6a1e-44fd-b118-71b3900170e7'" echo "" fi #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ -h "$S_FP_0" ]; then echo "" echo "The path " echo "" echo " $S_FP_0" echo "" echo "references a symlink, a file is expected." echo "The reason, why symlinks to files are not supported is that " echo "the file size of symlinks can differ from " echo "the file size of the target of the symlink." echo "GUID=='7afe9e27-cee1-4ad1-b218-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_exc_assert_packet_name_candidate_exists_t1() { local S_FP_0="$1" # Path to the file. #-------- if [ "$S_FP_0" == "" ]; then echo "" echo "The 2. console argument is expected to be " echo "a Silktorrent packet name candidate, but currently " echo "the 2. console argument is missing." echo "GUID=='227d93c4-61a6-42b7-b118-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_silktorrent_packager_t1_bash_exc_assert_packet_name_candidate_exists_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="for input and output" S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE="" # optim. hack func_mmmv_silktorrent_packager_t1_bash_reverse_string() { local S_IN="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER" #-------------------- local S_TMP_0="not set" # Mode selection: if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="gawk" # usually available on Linux func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="ruby" # helps on BSD func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "" ] ; then echo "" echo "All of the applications that this function is " echo "capable of using for finding out file size (gawk, ruby)" echo "are missing from the PATH." echo "GUID=='b55b1414-6247-47f6-9118-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='109b82e1-8efb-49a4-b408-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- #-------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="" #-------- if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "gawk" ]; then # The awk code example originates from # http://www.linuxandlife.com/2013/06/how-to-reverse-string.html # archival copy: https://archive.is/Cx0xF #---- S_TMP_0="`printf "$S_IN" | \ awk '{ for(i=length;i!=0;i--)x=x substr($0,i,1);}END{printf x}'`" if [ "$?" != "0" ]; then echo "" echo "The console application \"gawk\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`printf "$S_IN" | awk '{ for(i=length;i!=0;i--)x=x substr($0,i,1);}END{printf x}'`" echo "----console--outut--citation--end-------" echo "" echo "GUID=='95dcc43d-90b7-4bfd-8408-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="$S_TMP_0" fi #-------- if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_MODE" == "ruby" ]; then #---- S_TMP_0="`ruby -e \"puts(ARGV[0].to_s.reverse)\" "$S_IN" 2>/dev/null`" if [ "$?" != "0" ]; then echo "" echo "The console application \"ruby\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`ruby -e \"puts('$S_IN'.reverse)\"`" # with the stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='59c56443-ab6c-4899-9408-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="$S_TMP_0" fi #-------------------- } # func_mmmv_silktorrent_packager_t1_bash_reverse_string #-------------------------------------------------------------------------- # As of 2016 the maximum file name length on Linux is 255 characters. # At # # http://unix.stackexchange.com/questions/32795/what-is-the-maximum-allowed-filename-and-folder-size-with-ecryptfs # # the eCryptfs related recommendation is to keep the lengths # of file names to less than 140 characters. # # A citation from # http://windows.microsoft.com/en-us/windows/file-names-extensions-faq#1TC=windows-7 # archieval copy: https://archive.is/UKBmd # "Windows limits a single path to 260 characters." # # A citation from CygWin mailing list: # https://cygwin.com/ml/cygwin/2004-10/msg01323.html # archival copy: https://archive.is/GRvFK # "The Unicode versions of several functions permit a # maximum path length of 32,767 characters, # composed of components up to 255 characters in length. # To specify such a path, use the "\\?\" prefix. For example, # "\\?\D:\<path>". To specify such a UNC path, use the "\\?\UNC\" # prefix. For example, "\\?\UNC\<server>\<share>". # Note that these prefixes are not used as part of the path # itself. They indicate that the path should be passed to the # system with minimal modification. An implication of this is # that you cannot use forward slashes to represent path separators # or a period to represent the current directory." # Related pages: # https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx # archival copy: https://archive.is/p891y # # To allow database indexes that store the # file names of the blogs # to work as efficiently as possible, the first # characters of the file name should be as # uniformly random set of characters as possible. # If file name starts with a secure hash, then # that requirement is met. # # The parser that dismantles the file name to relevant components # should be implementable in different programming languages # without investing considerable amount of development time. # The syntax of the file name should also allow the # file name to be parsed computationally cheaply. # # As of 2016_05 the file extension .stblob seems to be unused. # Therefore the "silktorrent blob", .stblob, can be used for the # extension of the blob files. # # Compression of the blobs IS NOT ALLOWED, because the # blobs must be extractable without becoming a victim # of an attack, where 100GiB of zeros is packed to a # small file. The container format is the tar format, # without any compression. S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT="not set" func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- # The Tiger hash has 48 characters. # The Whirlpool hash has 128 characters. # The SHA-256 hash has 64 characters. # # A file size of 1TiB is ~10^12 ~ 13 characters # A file size of 1PiB is ~10^15 ~ 14 characters # A file size of 1EiB is ~10^18 ~ 19 characters # A file size of 1ZiB is ~10^21 ~ 22 characters # A file size of 1YiB is ~10^24 ~ 25 characters # # The max. file name length on Linux and # Windows (Unicode API) is 255 characters. #---- # The character budget: # 6 characters --- file name format type ID # rgx_in_ruby=/v[\d]{4}[_]/ # echo "v0034_s2342_" | gawk '{ gsub(/_/, "_\n"); print }' | \ # gawk '/^v[0-9]{4}_/ {printf "%s",$1 }' | \ # gawk '{gsub(/[v_]/,"");printf "%s", $1 }' # # max 32 characters --- file size # rgx_in_ruby=/s[\d]+[_]/ # echo "v0034_" | gawk '/^v[0-9]{4}_/ {printf "%s",$1 }' # echo "v0034_s2342_" | gawk '{ gsub(/_/, "_\n"); print }' | \ # gawk '/^s[0-9]+_/ {printf "%s",$1 }' | \ # gawk '{gsub(/[s_]/,"");printf "%s", $1 }' # # # 66 characters --- SHA-256 # rgx_in_ruby=/h[\dabcdef]{64}[_]/ # echo "h`sha256sum /dev/null | gawk '/[0-9abcdef]/ {printf "%s",$1}'`_" | \ # gawk '/^h[0-9abcdef]+_/ {printf "%s",$1 }' | \ # gawk '{gsub(/[h_]/,"");printf "%s", $1 }' # # # 50 characters --- Tiger # rgx_in_ruby=/i[\dabcdef]{48}$/ # lacks the ending "_" # # for db index optimization # The gawk code is as with the sha256, # except that sha256sum-> tigerdeep, "^h"->"^i", # "[h_]"->"[i_]" # #-------- # As the current version of this script depends on Ruby anyway, # the gawk regex based branches that are really # complex and require multiple gawk calls can be left unimplemented. # That way this script becomes more succinct. #-------------------- func_mmmv_tigerhash_t1 "$S_FP_0" #echo " Tiger: $S_FUNC_MMMV_TIGERHASH_T1_RESULT" #func_mmmv_whirlpoolhash_t1 "$S_FP_0" #echo " Whirlpool: $S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT" func_mmmv_sha256_t1 "$S_FP_0" #echo " SHA256: $S_FUNC_MMMV_SHA256_T1_RESULT" func_mmmv_filesize_t1 "$S_FP_0" #echo " file size: $S_FUNC_MMMV_FILESIZE_T1_RESULT" #-------- local S_NAME_REVERSED="bolbts." # ".stblob".reverse local S_0="v0001_s$S_FUNC_MMMV_FILESIZE_T1_RESULT" S_NAME_REVERSED="$S_NAME_REVERSED$S_0" S_0="_h$S_FUNC_MMMV_SHA256_T1_RESULT" S_NAME_REVERSED="$S_NAME_REVERSED$S_0" S_0="_i$S_FUNC_MMMV_TIGERHASH_T1_RESULT" S_NAME_REVERSED="$S_NAME_REVERSED$S_0" #---- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER="$S_NAME_REVERSED" func_mmmv_silktorrent_packager_t1_bash_reverse_string S_0="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_REVERSE_STRING_REGISTER" S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT="$S_0" } # func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1 #-------------------------------------------------------------------------- func_mmmv_delete_tmp_folder_t1(){ local S_FP_0="$1" # folder path #-------- if [ ! -e "$S_FP_0" ]; then echo "" echo "This script is flawed. The folder " echo " $S_FP_0" echo "is expected to exist during the " echo "call to this function." echo "GUID=='aa3a281b-e603-44e0-9208-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # To avoid a situation, where due to some # flaw the home folder or something else important # gets accidentally recursively deleted, # the following test transforms the path from # /tmp/../home/blabla # to a full path without the dots and then studies, whether # the full path points to somehwere in the /tmp local S_FP_1="`cd $S_FP_0; pwd`" if [ ! -e "$S_FP_1" ]; then echo "" echo "This script is flawed. The folder " echo " $S_FP_1" echo "is missing." echo "GUID=='f1c9d550-72d2-407d-9208-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`echo \"$S_FP_1\" | grep -E ^/home `" if [ "$S_TMP_0" != "" ]; then echo "" echo "This script is flawed." echo "The temporary sandbox folder must reside in /tmp." echo "" echo "S_FP_0==$S_FP_0" echo "" echo "S_FP_1==$S_FP_1" echo "" echo "S_TMP_0==$S_TMP_0" echo "" echo "GUID=='ef812232-9359-4769-9208-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi # Just to be sure, the same thing is checked by a slightly # different regex and using the "==" in stead of the "!=". S_TMP_0="`echo \"$S_FP_1\" | grep -E ^/tmp/`" if [ "$S_TMP_0" == "" ]; then echo "" echo "This script is flawed." echo "The temporary sandbox folder must reside in /tmp." echo "" echo "S_FP_0==$S_FP_0" echo "" echo "S_FP_1==$S_FP_1" echo "" echo "S_TMP_0==$S_TMP_0" echo "" echo "GUID=='4604f696-2a07-4943-b508-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- rm -fr $S_FP_1 if [ -e "$S_FP_1" ]; then echo "" echo "Something went wrong. The recursive deletion of the temporary folder, " echo " $S_FP_1" echo "failed." echo "GUID=='5e2970b5-eda5-4371-a208-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_delete_tmp_folder_t1 #-------------------------------------------------------------------------- # Throws, if there exists a file with the same path. func_mmmv_create_folder_if_it_does_not_already_exist_t1(){ local S_FP_0="$1" # folder path #-------- if [ "$S_FP_0" == "" ]; then # Using gawk and alike to cover also cases, where # $S_FP_0==" " # is intentionally left out to avoid the overhead, but # due to some luck the mkdir exits with an error code greater than 0, # if it misses a path argument. echo "" echo "S_FP_0==\"\"" echo "GUID=='24c43d27-d0bf-4114-b5f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- if [ -e "$S_FP_0" ]; then if [ ! -d "$S_FP_0" ]; then echo "" echo "The path that is suppose to reference either " echo "an existing folder or a non-existent folder, " echo "references a file." echo "GUID=='658b0135-9bb2-4a53-82f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi #-------- mkdir -p $S_FP_0 if [ "$?" != "0" ]; then echo "" echo "mkdir for path " echo " $S_FP_0" echo "failed." echo "GUID=='75439f3e-59f7-4751-b2f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- if [ ! -e "$S_FP_0" ]; then echo "" echo "mkdir execution succeeded, but for some other reason the folder " echo " $S_FP_0" echo "does not exist." echo "GUID=='92a90266-13b1-4468-b5f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_create_folder_if_it_does_not_already_exist_t1 #-------------------------------------------------------------------------- S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT="" # == "" on failure # otherwise full file path func_mmmv_create_tmp_folder_t1(){ # Does not take any arguments. #-------- #func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_GUID_t1" "$1" #-------------------- S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT="" # value for failure func_mmmv_GUID_t1 if [ "$S_FUNC_MMMV_GUID_T1_RESULT" == "" ]; then echo "" echo "This script is flawed. GUID generation failed and " echo "the GUID generation function did not throw despite " echo "the fact that it should have detected its own failure." echo "GUID=='4c3fc054-3af8-4cb4-94f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- local S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" # The following few if-clauses form a short unrolled loop. The unrolling # is for simplicity, because it is Bash, where loops are nasty. if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi if [ -e "$S_TMP_0" ]; then func_mmmv_GUID_t1 S_TMP_0="/tmp/tmp_silktorrent_$S_FUNC_MMMV_GUID_T1_RESULT" fi #---- if [ -e "$S_TMP_0" ]; then echo "" echo "This script failed to generate a locally unique path." echo "GUID=='864ea729-ebeb-488b-82f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi func_mmmv_create_folder_if_it_does_not_already_exist_t1 "$S_TMP_0" if [ ! -e "$S_TMP_0" ]; then echo "" echo "mkdir for path " echo " $S_TMP_0" echo "failed." echo "GUID=='54add286-d3ba-4fc9-81f7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT="$S_TMP_0" } # func_mmmv_create_tmp_folder_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT="not set" func_mmmv_silktorrent_packager_t1_bash_get_packet_format_version_t1() { local S_FP_0="$1" # Path to the file. #---- # It's not necessary for the file to actually exist, # because this function only analyzes the file path string. # func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" if [ "$S_FP_0" == "" ]; then echo "" echo "The file path candidate must not be an empty string." echo "GUID=='636ea139-ea1a-44ec-b1e7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- # The # # basename /tmp/foo/ # # returns # # foo # # That is to say, the "basename" ignores the rightmost slash. #---- local S_TMP_0="`ruby -e \"\ s='noslash';\ if(('$S_FP_0'.reverse)[0..0]=='/') then \ s='slash_present';\ end;\ puts(s);\ \"`" if [ "$S_TMP_0" != "noslash" ]; then echo "" echo "The path candidate must not end with a slash." echo "" echo " S_FP_0==$S_FP_0" echo "" echo " S_TMP_0==$S_TMP_0" echo "" echo "GUID=='27e5ea85-56d2-40d2-93e7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi basename $S_FP_0 1>/dev/null # to set a value to the $? in this scope if [ "$?" != "0" ]; then echo "" echo "The command " echo "" echo " basename $S_FP_0 " echo "" echo "exited with an error." echo "GUID=='72ca4146-50f7-41ee-92e7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi S_TMP_0="`basename $S_FP_0`" if [ "$S_TMP_0" == "" ]; then echo "" echo "The file path candidate must be a string that " echo "is not an empty string after " echo "all of the spaces and tabs have been removed from it." echo "GUID=='36dee451-756e-49de-83e7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT="" local S_OUT="unsupported_by_this_script_version" #-------- # In Ruby # "foo.stblob"[0..(-8)]=="foo" # "foo.stblob"[(-99)..(-1)]==nil # local S_TMP_1="`ruby -e \"\ x='$S_TMP_0'[0..(-8)];\ if(x!=nil) then\ md=x.reverse.match(/v[\\d]+/);\ if(md!=nil) then\ s_0=(md[0].to_s)[1..(-1)];\ print(s_0.sub(/^[0]+/,''));\ end;\ end;\ \"`" # echo "$S_TMP_0" # echo "$S_TMP_1" #---- if [ "$S_TMP_1" != "" ]; then S_OUT="silktorrent_packet_format_version_$S_TMP_1" fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT="$S_OUT" } # func_mmmv_silktorrent_packager_t1_bash_get_packet_format_version_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT="not set" func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- func_mmmv_silktorrent_packager_t1_bash_get_packet_format_version_t1 "$S_FP_0" local S_PACKET_FORMAT="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT" if [ "$S_PACKET_FORMAT" == "unsupported_by_this_script_version" ]; then echo "" echo "There exists a possibility that the " echo "Silktorrent packet candidate is actually OK, but " echo "this is an older version of the Silktorrent implementaiton and " echo "the older version does not support " echo "newer Silktorrent packet formats. " echo "The file path of the Silktorrent packet candidate:" echo "" echo " $S_FP_0" echo "" echo "GUID=='1158d282-b615-4c4c-93e7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_TMP_1="" if [ "$S_PACKET_FORMAT" == "silktorrent_packet_format_version_1" ]; then func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1 "$S_FP_0" #echo "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT" S_TMP_1="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT" fi #---- if [ "$S_TMP_1" == "" ]; then echo "" echo "This script is flawed." echo "It should have thrown before the control flow reaches this line." echo "GUID=='3aa4bc43-bbe8-440f-a2e7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_TMP_0="`basename $S_FP_0`" # The S_TMP_0 must be evaluated # after the various functions to # counter a situation, where # the S_TMP_0 is overwritten # by the name-calc function # or by one of the sub-functions # of the name-calc function. # The flaw occurs, when the # S_TMP_0 is used within the # name-calc function without # declaring it to be a local # variable. #-------- #echo "S_FP_0==$S_FP_0" #echo "S_TMP_0==$S_TMP_0" #echo "S_TMP_1==$S_TMP_1" local S_OUT="" if [ "$S_TMP_1" == "$S_TMP_0" ]; then S_OUT="verification_passed" else S_OUT="verification_failed" fi S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT="$S_OUT" } # func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_test_1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- echo "" #---- func_mmmv_tigerhash_t1 "$S_FP_0" echo " Tiger: $S_FUNC_MMMV_TIGERHASH_T1_RESULT" func_mmmv_whirlpoolhash_t1 "$S_FP_0" echo " Whirlpool: $S_FUNC_MMMV_WHIRLPOOLHASH_T1_RESULT" func_mmmv_sha256_t1 "$S_FP_0" echo " SHA256: $S_FUNC_MMMV_SHA256_T1_RESULT" func_mmmv_filesize_t1 "$S_FP_0" echo " file size: $S_FUNC_MMMV_FILESIZE_T1_RESULT" #---- echo "" } # func_mmmv_silktorrent_packager_t1_bash_test_1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_wrap_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- func_mmmv_create_tmp_folder_t1 if [ "$S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT" == "" ]; then echo "This script is flawed, because the folder " echo "creation function should have thrown " echo "before the control flow reaches this branch." echo "GUID=='726a8332-1505-4018-b2e7-71b3900170e7'" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_FP_TMP_0="$S_FUNC_FUNC_MMMV_CREATE_TMP_FOLDER_T1_RESULT" if [ ! -e "$S_FP_TMP_0" ]; then echo "This script is flawed." echo "May be some other thread deleted the folder or" echo "the folder creation function returned a valid path, but" echo "did not actually create the folder that it was supposed create." echo "S_FP_TMP_0==$S_FP_TMP_0" echo "GUID=='f8fc342c-18e1-40b4-a3d7-71b3900170e7'" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_FP_TMP_SILKTORRENT_PACKET="$S_FP_TMP_0/silktorrent_packet" local S_FP_TMP_SILKTORRENT_PACKET_TAR="$S_FP_TMP_0/silktorrent_packet.tar" local S_FP_TMP_PAYLOAD="$S_FP_TMP_SILKTORRENT_PACKET/payload" local S_FP_TMP_HEADER="$S_FP_TMP_SILKTORRENT_PACKET/header" local S_FP_TMP_HEADER_SALT_TXT="$S_FP_TMP_HEADER/silktorrent_salt.txt" func_mmmv_create_folder_if_it_does_not_already_exist_t1 "$S_FP_TMP_PAYLOAD" # uses mkdir -p func_mmmv_create_folder_if_it_does_not_already_exist_t1 "$S_FP_TMP_HEADER" #-------- # Salting makes sure that it is not possible to # conclude the payload bitstream from the # Silktorrent packet (file) name, forcing censoring # parties to download packages # that they are not looking for and allowing # censorship dodgers to publish the same payload bitstream # in multiple, differet, Silktorrent packages. func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT func_mmmv_GUID_t1 echo "$S_FUNC_MMMV_GUID_T1_RESULT" >> $S_FP_TMP_HEADER_SALT_TXT #-------- # The file size/Silktorrent pakcket size must also be salted. ruby -e \ "Random.new_seed;i=0;\ puts '';\ rand(10**6).times{\ i=i+1;\ print(rand(10**6).to_s(16));\ if((i%10)==0) then \ puts '';\ i=0;\ end;\ }" \ >> $S_FP_TMP_HEADER_SALT_TXT #-------- cp -f $S_FP_0 $S_FP_TMP_PAYLOAD/ if [ "$?" != "0" ]; then echo "" echo "The command " echo "" echo " cp -f \$S_FP_0 \$S_FP_TMP_PAYLOAD/ " echo "" echo "failed. Either this script is flawed or something else went wrong. " echo "" echo " S_FP_0==$S_FP_0" echo "" echo " S_FP_TMP_PAYLOAD=$S_FP_TMP_PAYLOAD" echo "" echo "GUID=='214ba8b2-3cff-420c-a4d7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_FP_TMP_ORIG_0="`pwd`" cd $S_FP_TMP_SILKTORRENT_PACKET/.. tar -cf $S_FP_TMP_SILKTORRENT_PACKET_TAR ./`basename $S_FP_TMP_SILKTORRENT_PACKET` 2>/dev/null cd $S_FP_TMP_ORIG_0 if [ "$?" != "0" ]; then echo "" echo "The command " echo "" echo " tar -cf \$S_FP_TMP_SILKTORRENT_PACKET_TAR \$S_FP_TMP_SILKTORRENT_PACKET " echo "" echo "failed. Either this script is flawed or something else went wrong. " echo "" echo " S_FP_TMP_SILKTORRENT_PACKET=$S_FP_TMP_SILKTORRENT_PACKET" echo "" echo " S_FP_TMP_SILKTORRENT_PACKET_TAR==$S_FP_TMP_SILKTORRENT_PACKET_TAR" echo "" echo "GUID=='68428819-d399-43c8-a2d7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- func_mmmv_silktorrent_packager_t1_bash_blob2filename_t1 "$S_FP_TMP_SILKTORRENT_PACKET_TAR" local S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME="$S_FP_ORIG/$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_BLOB2FILENAME_T1_RESULT" mv $S_FP_TMP_SILKTORRENT_PACKET_TAR $S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME if [ "$?" != "0" ]; then echo "" echo "Something went wrong." echo "The renaming and copying of " echo " $S_FP_TMP_SILKTORRENT_PACKET_TAR " echo "to " echo " $S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME " echo "failed." echo "GUID=='c158ce46-9e8d-4bb9-a2d7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi if [ ! -e "$S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME" ]; then echo "" echo "Something went wrong." echo "The renaming and copying of " echo "" echo " $S_FP_TMP_SILKTORRENT_PACKET_TAR " echo "" echo "to " echo "" echo " $S_FP_TMP_SILKTORRENT_PACKET_PUBLISHINGNAME " echo "" echo "failed. The mv command succeed, but for some reason " echo "the destination file does not exist." echo "GUID=='7f7e1258-7c19-451f-91d7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- func_mmmv_delete_tmp_folder_t1 "$S_FP_TMP_0" if [ -e "$S_FP_TMP_0" ]; then echo "" echo "Something went wrong." echo "The deletion of the temporary folder, " echo "" echo " $S_FP_TMP_0" echo "" echo "failed." echo "GUID=='23b56e4e-b7c4-4668-85d7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # func_mmmv_silktorrent_packager_t1_bash_wrap_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_unwrap_t1() { local S_FP_0="$1" # Path to the file. #---- func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_FP_0" #-------- func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1 "$S_FP_0" local S_PACKET_FORMAT="$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_GET_PACKET_FORMAT_VERSION_T1_RESULT" if [ "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT" != "verification_passed" ]; then echo "" echo "The Silktorrent packet candidate, " echo "" echo " $S_FP_0" echo "" echo "failed Silktorrent packet name verification." echo "There exists a possibility that the " echo "Silktorrent packet candidate is actually OK, but " echo "this is an older version of the Silktorrent implementaiton and " echo "this, the older, version does not support " echo "newer Silktorrent packet formats. " echo "GUID=='1ea93ef2-0fb7-4cbb-8fd7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local SB_FORMAT_BRANCH_EXISTS_IN_THIS_FUNCTION="f" if [ "$S_PACKET_FORMAT" == "silktorrent_packet_format_version_1" ]; then SB_FORMAT_BRANCH_EXISTS_IN_THIS_FUNCTION="t" #---- local S_FP_TMP_SILKTORRENT_PACKET="`pwd`/silktorrent_packet" if [ -e $S_FP_TMP_SILKTORRENT_PACKET ]; then echo "" echo "To avoid accidental deletion of files, " echo "and some other types of flaws, " echo "there is a requirement that the folder " echo "" echo " ./silktorrent_packet" echo "" echo "must be explicitly deleted before calling this script." echo "GUID=='df3e4c6e-045b-4163-bfc7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- tar -xf $S_FP_0 2>/dev/null if [ "$?" != "0" ]; then echo "" echo "Something went wrong. The command " echo "" echo " tar -xf $S_FP_0" echo "" echo "exited with an error code, which is $? ." echo "GUID=='07dfbc27-b793-4b68-93c7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi rm -f $S_FP_TMP_SILKTORRENT_PACKET/header/silktorrent_salt.txt #---- if [ ! -e $S_FP_TMP_SILKTORRENT_PACKET ]; then echo "" echo "Something went wrong. " echo "The unpacking of the Silktorrent packet with the path of " echo "" echo " $S_FP_0" echo "" echo "failed. The folder \"silktorrent_packet\" " echo "is missing after the \"tar\" exited without any errors." echo "GUID=='39c08e15-9cab-4585-8fc7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi fi # silktorrent_packet_format_version_1 #-------- if [ "$SB_FORMAT_BRANCH_EXISTS_IN_THIS_FUNCTION" != "t" ]; then echo "" echo "This script is flawed." echo "There is at least one branch missing from this function." echo "GUID=='b9f42610-010a-4a35-a1c7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- } # func_mmmv_silktorrent_packager_t1_bash_unwrap_t1 #-------------------------------------------------------------------------- func_mmmv_silktorrent_packager_t1_bash_verify_packet_name_format_v1(){ local S_PACKET_NAME_CANDIDATE="$1" if [ "$S_PACKET_NAME_CANDIDATE" == "" ]; then echo "" echo "This script is flawed." echo "Input verification should have cauht the " echo "\"\" case before the control flow reaches this line." echo "GUID=='eb6d4411-292c-40b6-a4c7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- local S_OUT="verification_failed" # opposite: "verification_passed" # rgx_in_ruby=/v[\d]{4}[_]/ # rgx_in_ruby=/s[\d]+[_]/ # rgx_in_ruby=/h[\dabcdef]{64}[_]/ # rgx_in_ruby=/i[\dabcdef]{48}$/ # lacks the ending "_" # # for db index optimization local S_RUBY_REGEX="/^X[\\dabcdef]{48}i[_][\\dabcdef]{64}h[_][\\d]+s[_][\\d]{4}v.stblobX\$/" # Tiger SHA-256 size version # test cases: # ruby -e "puts(ARGV[0])" aa\ bb # printf "%q" "AA BB CC $^ \ / '\`\" <>()[];.{}" | xargs ruby -e "puts(ARGV[0])" # # The S_PACKET_NAME_CANDIDATE might contain various quotation marks. # If it does, then hopefully it crashes at least something so that # the crash can be detected from the "$?". # The surrounding X-es, X<packet name candidate string>X, # are to counter a situation, where the file name candidate ends # with a pspace, like "foo " and the Bash reads the console # argument in as "foo" in stead of the "foo ". #---- #local S_TMP_0="`printf \"%q\" \"'$S_PACKET_NAME_CANDIDATE'\" | xargs ruby -e \" \ local S_TMP_0="`ruby -e \" \ s_in=ARGV[0];\ rgx=$S_RUBY_REGEX;\ md=s_in.match(rgx);\ s_out='no_match';\ if(md!=nil) then \ s_out='match';\ end;\ printf(s_out);\ \" \"$S_PACKET_NAME_CANDIDATE\" `" #---- if [ "$?" != "0" ]; then echo "" echo "Something went wrong. \$?==$? " echo " S_PACKET_NAME_CANDIDATE==$S_PACKET_NAME_CANDIDATE" echo "GUID=='41352353-e739-4fd1-b1c7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- # If the file name starts like "./foo" in stead of "foo", # then the verification also fails, # exactly as expected and demanded by the spec. if [ "$S_TMP_0" == "match" ]; then S_OUT="verification_passed" # opposite: "verification_failed" fi #-------- echo "$S_OUT" } # func_mmmv_silktorrent_packager_t1_bash_verify_packet_name_format_v1 #-------------------------------------------------------------------------- # The S_SILKTORRENT_PACKAGER_T1_ACTION="" # is global to allow it to be used # in the error messages of different functions. func_mmmv_silktorrent_packager_t1_bash_determine_action() { local S_ARGV_0="$1" # Ruby style ARGV, 0 is the first command line argument. local S_ARGV_1="$2" local S_ARGV_2="$3" local S_ARGV_3="$4" #-------- if [ "$S_ARGV_0" == "" ]; then func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #---- cd $S_FP_ORIG exit 1 # exit with an error fi #---- local SB_0="f" if [ "$S_ARGV_0" == "help" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "--help" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "-?" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "-h" ]; then SB_0="t" fi #---- if [ "$SB_0" == "t" ]; then func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #---- cd $S_FP_ORIG exit 0 # exit without an error fi #-------------------------- if [ "$S_ARGV_0" == "version" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "--version" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "-version" ]; then SB_0="t" fi if [ "$S_ARGV_0" == "-v" ]; then SB_0="t" fi #---- if [ "$SB_0" == "t" ]; then echo "$S_SCRIPT_VERSION" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #-------------------------- # Start of actions that require the existance of at least one file. local SB_FILE_REQUIRED="t" local SB_REQUESTED_ACTION_EXISTS="f" local S_TMP_0="" local S_TMP_1="" #---- S_TMP_0="wrap" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" fi if [ "$S_ARGV_0" == "pack" ]; then # alias S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" fi #---- S_TMP_0="unwrap" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" fi if [ "$S_ARGV_0" == "unpack" ]; then # alias S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" fi #---- S_TMP_0="verify" # checks the matche between the blob and the file name if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" fi #---- S_TMP_0="test_hash_t1" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" fi #-------- # Start of actions that do not require a file: S_TMP_0="verify_packet_name_format_v1" if [ "$S_ARGV_0" == "$S_TMP_0" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" SB_FILE_REQUIRED="f" fi if [ "$S_ARGV_0" == "verify_package_name_format_v1" ]; then S_SILKTORRENT_PACKAGER_T1_ACTION="$S_TMP_0" SB_REQUESTED_ACTION_EXISTS="t" SB_FILE_REQUIRED="f" fi #-------- if [ "$SB_REQUESTED_ACTION_EXISTS" != "t" ]; then # lack of action included func_mmmv_silktorrent_packager_t1_bash_print_help_msg_t1 #---- cd $S_FP_ORIG exit 1 # exit with an error fi SB_REQUESTED_ACTION_EXISTS="f" # a reset to anticipate flaws elsewhere # The action name test above has to be before the if [ "$SB_FILE_REQUIRED" == "t" ]; then func_mmmv_silktorrent_packager_t1_bash_exc_assert_wrappable_file_exists_t1 "$S_ARGV_1" else func_mmmv_silktorrent_packager_t1_bash_exc_assert_packet_name_candidate_exists_t1 "$S_ARGV_1" fi # because otherwise the error messages would be incorrect. #-------- # The following duplicating series of if-clauses is to allow # actions to have aliases. if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "wrap" ]; then func_mmmv_silktorrent_packager_t1_bash_wrap_t1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "unwrap" ]; then func_mmmv_silktorrent_packager_t1_bash_unwrap_t1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "verify" ]; then func_mmmv_silktorrent_packager_t1_bash_verify_file_name_t1 "$S_ARGV_1" echo "$S_FUNC_MMMV_SILKTORRENT_PACKAGER_T1_BASH_VERIFY_FILE_NAME_T1_RESULT" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #---- if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "test_hash_t1" ]; then func_mmmv_silktorrent_packager_t1_bash_test_1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #-------- # Start of actions that do not require a file: if [ "$S_SILKTORRENT_PACKAGER_T1_ACTION" == "verify_packet_name_format_v1" ]; then func_mmmv_silktorrent_packager_t1_bash_verify_packet_name_format_v1 "$S_ARGV_1" #---- cd $S_FP_ORIG exit 0 # exit without an error fi #-------------------------- echo "" echo "This bash script is flawed. The control flow " echo "should have never reached this line." echo "GUID=='e3af811a-93a7-4512-91b7-71b3900170e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with an error } # func_mmmv_silktorrent_packager_t1_bash_determine_action func_mmmv_silktorrent_packager_t1_bash_determine_action $1 $2 $3 $4 $5 $6 $7 #-------------------------------------------------------------------------- #-------------------------------------------------------------------------- cd $S_FP_ORIG exit 0 # #========================================================================== # Fragments of comments and code that might find use some times later: #-------------------------------------------------------------------------- # # max 55 characters --- package suggested deprecation date in nanoseconds # relative to the Unix Epoch, # written in base 10. It can be negative. # rgx_in_ruby=/t((y[-]?[\d]+)|n)[_]/ # echo "v0034_s2342_tn_" | gawk '{ gsub(/_/, "_\n"); print }' | \ # gawk '/^t(y[-]?[0-9]+|n)_/ {printf "%s",$1 }' | # gawk '{gsub(/[tyn_]/,"");printf "%s", $1 }' # # #========================================================================== |
Added work_in_progress/COMMENTS.txt version [625ecc2027].
> > > > |
1 2 3 4 |
This folder might one day contain the Silktorrent "development trunk". |
Added work_in_progress/doc/logo/How_to_draw_the_Silktorrent_logo_type_01.xcf version [9e025ce94f].
cannot compute difference between binary files
Added work_in_progress/doc/logo/Silktorrent_logo_type_01_Inkscape_development_file.svg version [2142436c4a].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 2029 2030 2031 2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2070 2071 2072 2073 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 2115 2116 2117 2118 2119 2120 2121 2122 2123 2124 2125 2126 2127 2128 2129 2130 2131 2132 2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 2154 2155 2156 2157 2158 2159 2160 2161 2162 2163 2164 2165 2166 2167 2168 2169 2170 2171 2172 2173 2174 2175 2176 2177 2178 2179 2180 2181 2182 2183 2184 2185 2186 2187 2188 2189 2190 2191 2192 2193 2194 2195 2196 2197 2198 2199 2200 2201 2202 2203 2204 2205 2206 2207 2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 2295 2296 2297 2298 2299 2300 2301 2302 2303 2304 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="744.09448819" height="1052.3622047" id="svg2" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="Silktorrent_logo_inkscape_devel_file.svg"> <defs id="defs4"> <inkscape:path-effect effect="skeletal" id="path-effect3903" is_visible="true" pattern="M 0,0 0,10 10,5 z" copytype="single_stretched" prop_scale="1" scale_y_rel="false" spacing="0" normal_offset="0" tang_offset="0" prop_units="false" vertical_pattern="false" fuse_tolerance="0" /> <inkscape:perspective sodipodi:type="inkscape:persp3d" inkscape:vp_x="0 : 526.18109 : 1" inkscape:vp_y="0 : 1000 : 0" inkscape:vp_z="744.09448 : 526.18109 : 1" inkscape:persp3d-origin="372.04724 : 350.78739 : 1" id="perspective3885" /> </defs> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.98994949" inkscape:cx="348.69994" inkscape:cy="436.1729" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:snap-bbox="true" inkscape:window-width="1024" inkscape:window-height="702" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1"> <inkscape:grid type="xygrid" id="grid2987" /> </sodipodi:namedview> <metadata id="metadata7"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-5" width="20" height="20" x="760" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-09" width="20" height="20" x="780" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-3" width="20" height="20" x="800" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-9" width="20" height="20" x="820" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-5" width="20" height="20" x="760" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-9" width="20" height="20" x="780" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-0" width="20" height="20" x="800" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-7" width="20" height="20" x="820" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-7" width="20" height="20" x="760" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-4" width="20" height="20" x="780" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-1" width="20" height="20" x="800" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-00" width="20" height="20" x="820" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-7" width="20" height="20" x="760" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-40" width="20" height="20" x="780" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-61" width="20" height="20" x="800" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-9" width="20" height="20" x="820" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0-6" width="20" height="20" x="840" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0-0" width="20" height="20" x="860" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14-5" width="20" height="20" x="880" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3-0" width="20" height="20" x="900" y="432.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-0" width="20" height="20" x="840" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-6" width="20" height="20" x="860" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-3" width="20" height="20" x="880" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-8" width="20" height="20" x="900" y="492.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-8" width="20" height="20" x="840" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-3" width="20" height="20" x="860" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-6" width="20" height="20" x="880" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-5" width="20" height="20" x="900" y="472.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5-5" width="20" height="20" x="840" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4-5" width="20" height="20" x="860" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0-05" width="20" height="20" x="880" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5-2" width="20" height="20" x="900" y="452.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-76-1" width="20" height="20" x="760" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-16-7" width="20" height="20" x="780" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-50-9" width="20" height="20" x="800" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-01-1" width="20" height="20" x="820" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-8-1" width="20" height="20" x="760" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-7-1" width="20" height="20" x="780" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-6-1" width="20" height="20" x="800" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-4-4" width="20" height="20" x="820" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-9-0" width="20" height="20" x="760" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-0-7" width="20" height="20" x="780" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-6-4" width="20" height="20" x="800" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-1-7" width="20" height="20" x="820" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-2-8" width="20" height="20" x="760" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-0-3" width="20" height="20" x="780" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-6-5" width="20" height="20" x="800" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-6-8" width="20" height="20" x="820" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0-4-8" width="20" height="20" x="840" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0-7-5" width="20" height="20" x="860" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14-7-1" width="20" height="20" x="880" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3-5-6" width="20" height="20" x="900" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-9-0" width="20" height="20" x="840" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-9-1" width="20" height="20" x="860" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-7-6" width="20" height="20" x="880" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-4-4" width="20" height="20" x="900" y="572.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-4-7" width="20" height="20" x="840" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-0-2" width="20" height="20" x="860" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-1-1" width="20" height="20" x="880" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-2" width="20" height="20" x="900" y="552.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5-8-4" width="20" height="20" x="840" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4-2-6" width="20" height="20" x="860" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0-0-4" width="20" height="20" x="880" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5-5-6" width="20" height="20" x="900" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-6" width="20" height="20" x="760" y="372.36218" /> <rect style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-67" width="20" height="20" x="790" y="372.36218" /> <g id="g3660" transform="translate(600,280)"> <g id="g3532"> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989" width="20" height="20" x="160" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7" width="20" height="20" x="180" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8" width="20" height="20" x="200" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1" width="20" height="20" x="220" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4" width="20" height="20" x="160" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6" width="20" height="20" x="180" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1" width="20" height="20" x="200" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2" width="20" height="20" x="220" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0" width="20" height="20" x="240" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0" width="20" height="20" x="260" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14" width="20" height="20" x="280" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3" width="20" height="20" x="300" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5" width="20" height="20" x="240" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4" width="20" height="20" x="260" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0" width="20" height="20" x="280" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5" width="20" height="20" x="300" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-8" width="20" height="20" x="160" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-7" width="20" height="20" x="180" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-6" width="20" height="20" x="200" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-4" width="20" height="20" x="220" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-9" width="20" height="20" x="160" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-0" width="20" height="20" x="180" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-6" width="20" height="20" x="200" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-1" width="20" height="20" x="220" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-9" width="20" height="20" x="240" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-9" width="20" height="20" x="260" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-7" width="20" height="20" x="280" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-4" width="20" height="20" x="300" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-4" width="20" height="20" x="240" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-0" width="20" height="20" x="260" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-1" width="20" height="20" x="280" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1" width="20" height="20" x="300" y="512.36218" /> </g> <rect y="492.36218" x="300" height="20" width="20" id="rect2989-7-1-7-0-1-67-7" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="492.36218" x="280" height="20" width="20" id="rect2989-7-1-7-0-1-67-70" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="180" height="20" width="20" id="rect2989-7-1-7-0-1-67-1" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="180" height="20" width="20" id="rect2989-7-1-7-0-1-67-7-9" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="160" height="20" width="20" id="rect2989-7-1-7-0-1-67-70-7" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="392.36218" x="280" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-7" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="492.36218" x="260" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-0" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="200" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-1" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> </g> <g id="g4911"> <g transform="translate(0,20)" id="g3532-0"> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-80" width="20" height="20" x="160" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-69" width="20" height="20" x="180" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2" width="20" height="20" x="200" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-35" width="20" height="20" x="220" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-1" width="20" height="20" x="160" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-7" width="20" height="20" x="180" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-6" width="20" height="20" x="200" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-6" width="20" height="20" x="220" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0-1" width="20" height="20" x="240" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0-5" width="20" height="20" x="260" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14-0" width="20" height="20" x="280" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3-9" width="20" height="20" x="300" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5-1" width="20" height="20" x="240" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4-8" width="20" height="20" x="260" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0-8" width="20" height="20" x="280" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5-0" width="20" height="20" x="300" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-8-5" width="20" height="20" x="160" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-7-0" width="20" height="20" x="180" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-6-4" width="20" height="20" x="200" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-4-5" width="20" height="20" x="220" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-9-7" width="20" height="20" x="160" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-0-1" width="20" height="20" x="180" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-6-3" width="20" height="20" x="200" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-1-6" width="20" height="20" x="220" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-9-4" width="20" height="20" x="240" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-9-7" width="20" height="20" x="260" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-7-66" width="20" height="20" x="280" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-4-7" width="20" height="20" x="300" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-4-6" width="20" height="20" x="240" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-0-3" width="20" height="20" x="260" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-1-8" width="20" height="20" x="280" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-8" width="20" height="20" x="300" y="512.36218" /> </g> <path inkscape:connector-curvature="0" id="path4679" d="m 300,432.36218 -20,0 -80,40 60,40 -80,40 20,0 80,-40 -60,-40 z" style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> <g transform="translate(610,460)" id="g4681-2"> <g transform="translate(0,20)" id="g3532-0-2"> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-80-7" width="20" height="20" x="160" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-69-0" width="20" height="20" x="180" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-4" width="20" height="20" x="200" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-35-4" width="20" height="20" x="220" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-1-1" width="20" height="20" x="160" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-7-8" width="20" height="20" x="180" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-6-1" width="20" height="20" x="200" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-6-0" width="20" height="20" x="220" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0-1-2" width="20" height="20" x="240" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0-5-7" width="20" height="20" x="260" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14-0-9" width="20" height="20" x="280" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3-9-8" width="20" height="20" x="300" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5-1-4" width="20" height="20" x="240" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4-8-5" width="20" height="20" x="260" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0-8-4" width="20" height="20" x="280" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5-0-1" width="20" height="20" x="300" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-8-5-1" width="20" height="20" x="160" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-7-0-9" width="20" height="20" x="180" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-6-4-2" width="20" height="20" x="200" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-4-5-0" width="20" height="20" x="220" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-9-7-9" width="20" height="20" x="160" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-0-1-5" width="20" height="20" x="180" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-6-3-2" width="20" height="20" x="200" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-1-6-6" width="20" height="20" x="220" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-9-4-9" width="20" height="20" x="240" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-9-7-8" width="20" height="20" x="260" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-7-66-7" width="20" height="20" x="280" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-4-7-8" width="20" height="20" x="300" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-4-6-8" width="20" height="20" x="240" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-0-3-9" width="20" height="20" x="260" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-1-8-2" width="20" height="20" x="280" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-8-7" width="20" height="20" x="300" y="512.36218" /> </g> <rect y="512.36218" x="300" height="20" width="20" id="rect2989-7-1-7-0-1-67-7-8-1" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="512.36218" x="280" height="20" width="20" id="rect2989-7-1-7-0-1-67-70-3-7" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="180" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-07-4" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="452.36218" x="180" height="20" width="20" id="rect2989-7-1-7-0-1-67-7-9-2-4" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="452.36218" x="160" height="20" width="20" id="rect2989-7-1-7-0-1-67-70-7-6-7" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="280" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-7-0-5" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="512.36218" x="260" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-0-9-5" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="452.36218" x="200" height="20" width="20" id="rect2989-7-1-7-0-1-67-1-1-8-9" style="fill:#ffd5d5;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <path inkscape:connector-curvature="0" id="path4679-4" d="m 300,432.36218 -20,0 -80,40 60,40 -80,40 20,0 80,-40 -60,-40 z" style="fill:#e184fe;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> <g transform="translate(810,20)" id="g4911-6"> <g transform="translate(0,20)" id="g3532-0-9"> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-80-8" width="20" height="20" x="160" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-69-1" width="20" height="20" x="180" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-42" width="20" height="20" x="200" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-35-2" width="20" height="20" x="220" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-1-3" width="20" height="20" x="160" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-7-4" width="20" height="20" x="180" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-6-4" width="20" height="20" x="200" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-6-5" width="20" height="20" x="220" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0-1-1" width="20" height="20" x="240" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0-5-6" width="20" height="20" x="260" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14-0-1" width="20" height="20" x="280" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3-9-3" width="20" height="20" x="300" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5-1-6" width="20" height="20" x="240" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4-8-8" width="20" height="20" x="260" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0-8-3" width="20" height="20" x="280" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5-0-7" width="20" height="20" x="300" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-8-5-9" width="20" height="20" x="160" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-7-0-6" width="20" height="20" x="180" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-6-4-4" width="20" height="20" x="200" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-4-5-1" width="20" height="20" x="220" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-9-7-5" width="20" height="20" x="160" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-0-1-8" width="20" height="20" x="180" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-6-3-7" width="20" height="20" x="200" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-1-6-2" width="20" height="20" x="220" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-9-4-6" width="20" height="20" x="240" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-9-7-4" width="20" height="20" x="260" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-7-66-4" width="20" height="20" x="280" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-4-7-0" width="20" height="20" x="300" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-4-6-0" width="20" height="20" x="240" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-0-3-3" width="20" height="20" x="260" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-1-8-1" width="20" height="20" x="280" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-8-1" width="20" height="20" x="300" y="512.36218" /> </g> <path inkscape:connector-curvature="0" id="path4679-9" d="m 300,432.36218 -20,0 -80,40 60,40 -80,40 20,0 80,-40 -60,-40 z" style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> <g id="g5537" inkscape:export-xdpi="56.200001" inkscape:export-ydpi="56.200001" inkscape:export-filename="/home/ts2/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/juur_liivakast/silktorrent_development_deliverables/doc/logo/ready_for_use/Silktorrent_logo_FossilColor_100x100.png"> <rect y="412.36218" x="490" height="20" width="20" id="rect2989-80-5" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="510" height="20" width="20" id="rect2989-7-69-10" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="530" height="20" width="20" id="rect2989-8-2-04" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="550" height="20" width="20" id="rect2989-7-1-35-7" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="490" height="20" width="20" id="rect2989-4-1-17" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="510" height="20" width="20" id="rect2989-7-6-7-5" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="530" height="20" width="20" id="rect2989-8-1-6-2" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="550" height="20" width="20" id="rect2989-7-1-2-6-3" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="570" height="20" width="20" id="rect2989-0-1-23" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="590" height="20" width="20" id="rect2989-7-0-5-9" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="610" height="20" width="20" id="rect2989-8-14-0-96" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="412.36218" x="630" height="20" width="20" id="rect2989-7-1-3-9-6" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="570" height="20" width="20" id="rect2989-4-5-1-7" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="590" height="20" width="20" id="rect2989-7-6-4-8-4" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="610" height="20" width="20" id="rect2989-8-1-0-8-8" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="432.36218" x="630" height="20" width="20" id="rect2989-7-1-2-5-0-5" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="490" height="20" width="20" id="rect2989-9-8-5-8" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="510" height="20" width="20" id="rect2989-7-3-7-0-4" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="530" height="20" width="20" id="rect2989-8-2-6-4-6" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="550" height="20" width="20" id="rect2989-7-1-0-4-5-9" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="490" height="20" width="20" id="rect2989-99-9-7-8" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="510" height="20" width="20" id="rect2989-7-34-0-1-7" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="530" height="20" width="20" id="rect2989-8-5-6-3-27" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="550" height="20" width="20" id="rect2989-7-1-7-1-6-4" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="570" height="20" width="20" id="rect2989-9-2-9-4-8" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="590" height="20" width="20" id="rect2989-7-3-1-9-7-2" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="610" height="20" width="20" id="rect2989-8-2-1-7-66-5" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="552.36218" x="630" height="20" width="20" id="rect2989-7-1-0-9-4-7-9" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="570" height="20" width="20" id="rect2989-99-1-4-6-4" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="590" height="20" width="20" id="rect2989-7-34-9-0-3-98" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="610" height="20" width="20" id="rect2989-8-5-0-1-8-6" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="532.36218" x="630" height="20" width="20" id="rect2989-7-1-7-0-1-8-73" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" /> <path inkscape:connector-curvature="0" id="path4679-0" d="m 630,432.36218 -20,0 -80,40 60,40 -80,40 20,0 80,-40 -60,-40 z" style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> <g id="g5572" inkscape:export-filename="/home/ts2/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/juur_liivakast/silktorrent_development_deliverables/doc/logo/ready_for_use/Silktorrent_logo_black_60x60.png" inkscape:export-xdpi="33.720001" inkscape:export-ydpi="33.720001"> <rect y="672.36218" x="20" height="20" width="20" id="rect2989-80-3" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="40" height="20" width="20" id="rect2989-7-69-17" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="60" height="20" width="20" id="rect2989-8-2-07" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="80" height="20" width="20" id="rect2989-7-1-35-6" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="20" height="20" width="20" id="rect2989-4-1-4" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="40" height="20" width="20" id="rect2989-7-6-7-7" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="60" height="20" width="20" id="rect2989-8-1-6-24" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="80" height="20" width="20" id="rect2989-7-1-2-6-2" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="100" height="20" width="20" id="rect2989-0-1-0" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="120" height="20" width="20" id="rect2989-7-0-5-3" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="140" height="20" width="20" id="rect2989-8-14-0-2" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="672.36218" x="160" height="20" width="20" id="rect2989-7-1-3-9-7" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="100" height="20" width="20" id="rect2989-4-5-1-8" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="120" height="20" width="20" id="rect2989-7-6-4-8-1" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="140" height="20" width="20" id="rect2989-8-1-0-8-1" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="692.36218" x="160" height="20" width="20" id="rect2989-7-1-2-5-0-6" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="20" height="20" width="20" id="rect2989-9-8-5-6" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="40" height="20" width="20" id="rect2989-7-3-7-0-8" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="60" height="20" width="20" id="rect2989-8-2-6-4-5" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="80" height="20" width="20" id="rect2989-7-1-0-4-5-07" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="20" height="20" width="20" id="rect2989-99-9-7-58" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="40" height="20" width="20" id="rect2989-7-34-0-1-6" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="60" height="20" width="20" id="rect2989-8-5-6-3-9" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="80" height="20" width="20" id="rect2989-7-1-7-1-6-8" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="100" height="20" width="20" id="rect2989-9-2-9-4-89" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="120" height="20" width="20" id="rect2989-7-3-1-9-7-21" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="140" height="20" width="20" id="rect2989-8-2-1-7-66-6" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="812.36218" x="160" height="20" width="20" id="rect2989-7-1-0-9-4-7-4" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="100" height="20" width="20" id="rect2989-99-1-4-6-04" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="120" height="20" width="20" id="rect2989-7-34-9-0-3-0" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="140" height="20" width="20" id="rect2989-8-5-0-1-8-8" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <rect y="792.36218" x="160" height="20" width="20" id="rect2989-7-1-7-0-1-8-6" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dasharray:none;stroke-dashoffset:0" /> <path inkscape:connector-curvature="0" id="path4679-42" d="m 160,692.36218 -20,0 -80,40 60,40 -80,40 20,0 80,-40 -60,-40 z" style="fill:#000000;fill-opacity:0.94117647000000004;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0.94117647" /> </g> <g transform="translate(110,260)" id="g4911-60"> <g transform="translate(0,20)" id="g3532-0-65"> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-80-87" width="20" height="20" x="160" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-69-8" width="20" height="20" x="180" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-43" width="20" height="20" x="200" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-35-62" width="20" height="20" x="220" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-1-6" width="20" height="20" x="160" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-7-6" width="20" height="20" x="180" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-6-7" width="20" height="20" x="200" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-6-4" width="20" height="20" x="220" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-0-1-28" width="20" height="20" x="240" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-0-5-33" width="20" height="20" x="260" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-14-0-97" width="20" height="20" x="280" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-3-9-4" width="20" height="20" x="300" y="392.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-4-5-1-73" width="20" height="20" x="240" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-6-4-8-52" width="20" height="20" x="260" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-1-0-8-35" width="20" height="20" x="280" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-2-5-0-0" width="20" height="20" x="300" y="412.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-8-5-7" width="20" height="20" x="160" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-7-0-97" width="20" height="20" x="180" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-6-4-7" width="20" height="20" x="200" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-4-5-5" width="20" height="20" x="220" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-9-7-4" width="20" height="20" x="160" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-0-1-54" width="20" height="20" x="180" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-6-3-5" width="20" height="20" x="200" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-1-6-20" width="20" height="20" x="220" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-9-2-9-4-3" width="20" height="20" x="240" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-3-1-9-7-46" width="20" height="20" x="260" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-2-1-7-66-9" width="20" height="20" x="280" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-0-9-4-7-3" width="20" height="20" x="300" y="532.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-99-1-4-6-2" width="20" height="20" x="240" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-34-9-0-3-4" width="20" height="20" x="260" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-8-5-0-1-8-4" width="20" height="20" x="280" y="512.36218" /> <rect style="fill:#0000ff;fill-opacity:1;stroke:#dc0000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" id="rect2989-7-1-7-0-1-8-77" width="20" height="20" x="300" y="512.36218" /> </g> <path inkscape:connector-curvature="0" id="path4679-3" d="m 300,432.36218 -20,0 -80,40 60,40 -80,40 20,0 80,-40 -60,-40 z" style="fill:#0000ff;fill-opacity:1;stroke:#0000ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> </g> </g> </svg> |
Added work_in_progress/doc/logo/ready_for_use/How_to_draw_the_Silktorrent_logo_type_01.jpeg version [fa4d225f50].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_black.svg version [5e530c77c2].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="160" height="160" id="svg3405" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="Silktorrent_logo_black.svg"> <defs id="defs3407" /> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1.4" inkscape:cx="60.71875" inkscape:cy="81.807662" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1024" inkscape:window-height="702" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" /> <metadata id="metadata3410"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-314.28125,-386.65625)"> <path style="fill:#000000;fill-opacity:0.94117647;stroke:#000000;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.94117647;stroke-dashoffset:0" d="m 314.28125,386.65625 c 0,13.33333 0,26.66667 0,40 26.65625,0 53.3125,0 79.96875,0 -13.32292,6.66667 -26.64583,13.33333 -39.96875,20 20,13.33333 40,26.66667 60,40 -13.33333,6.66667 -26.66667,13.33333 -40,20 -20,0 -40,0 -60,0 0,13.33333 0,26.66667 0,40 53.33333,0 106.66667,0 160,0 0,-13.33333 0,-26.66667 0,-40 -26.66667,0 -53.33333,0 -80,0 13.33333,-6.66667 26.66667,-13.33333 40,-20 -20,-13.33333 -40,-26.66667 -60,-40 13.33333,-6.66667 26.66667,-13.33333 40,-20 20,0 40,0 60,0 0,-13.33333 0,-26.66667 0,-40 -53.33333,0 -106.66667,0 -160,0 z" id="rect2989-80-3" inkscape:connector-curvature="0" inkscape:export-filename="/home/ts2/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/juur_liivakast/silktorrent_development_deliverables/doc/logo/ready_for_use/Silktorrent_logo_black_600x600.png" inkscape:export-xdpi="337.23654" inkscape:export-ydpi="337.23654" /> </g> </svg> |
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_black_100x100.png version [90c3f62ef0].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_black_200x200.png version [4edde7d9f1].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_black_600x600.png version [22c8f72879].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_black_60x60.png version [bf16a91476].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_fossilcolor.svg version [0c650c5568].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 |
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!-- Created with Inkscape (http://www.inkscape.org/) --> <svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="160.125" height="160.125" id="svg3361" version="1.1" inkscape:version="0.48.5 r10040" sodipodi:docname="silktorrent_logo_type_01_fossilcolors.svg"> <defs id="defs3363" /> <sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="0.7" inkscape:cx="92.21875" inkscape:cy="-39.924683" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="false" fit-margin-top="0" fit-margin-left="0" fit-margin-right="0" fit-margin-bottom="0" inkscape:window-width="1024" inkscape:window-height="702" inkscape:window-x="0" inkscape:window-y="27" inkscape:window-maximized="1" /> <metadata id="metadata3366"> <rdf:RDF> <cc:Work rdf:about=""> <dc:format>image/svg+xml</dc:format> <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> <dc:title></dc:title> </cc:Work> </rdf:RDF> </metadata> <g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-282.78125,-332.3125)"> <path style="fill:#558195;fill-opacity:1;stroke:#558195;stroke-width:0;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0" d="m 282.84375,332.375 c 0,13.33333 0,26.66667 0,40 26.65625,0 53.3125,0 79.96875,0 -13.32292,6.66667 -26.64583,13.33333 -39.96875,20 20,13.33333 40,26.66667 60,40 -13.33333,6.66667 -26.66667,13.33333 -40,20 -20,0 -40,0 -60,0 0,13.33333 0,26.66667 0,40 53.33333,0 106.66667,0 160,0 0,-13.33333 0,-26.66667 0,-40 -26.66667,0 -53.33333,0 -80,0 13.33333,-6.66667 26.66667,-13.33333 40,-20 -20,-13.33333 -40,-26.66667 -60,-40 13.33333,-6.66667 26.66667,-13.33333 40,-20 20,0 40,0 60,0 0,-13.33333 0,-26.66667 0,-40 -53.33333,0 -106.66667,0 -160,0 z" id="rect2989-80-5" inkscape:connector-curvature="0" inkscape:export-filename="/home/ts2/Projektid/progremise_infrastruktuur/andmevahetustarkvara/rakendusvõrgud/silktorrent/juur_liivakast/silktorrent_development_deliverables/doc/logo/ready_for_use/Silktorrent_logo_FossilColor_600x600.png" inkscape:export-xdpi="337.23999" inkscape:export-ydpi="337.23999" /> </g> </svg> |
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_fossilcolor_100x100.png version [4bed0c015e].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_fossilcolor_200x200.png version [b71c24fe92].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_fossilcolor_50x50.png version [a7d2f1fece].
cannot compute difference between binary files
Added work_in_progress/doc/logo/ready_for_use/silktorrent_logo_type_01_fossilcolor_600x600.png version [18eb02760d].
cannot compute difference between binary files
Added work_in_progress/mmmv_Fossil_operator_t1.bash version [31cc9fef70].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 |
#!/usr/bin/env bash # Initial author: Martin.Vahi@softf1.com # This file is in the public domain. #========================================================================== S_FP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" S_FP_ORIG="`pwd`" S_TIMESTAMP="`date +%Y`_`date +%m`_`date +%d`_T_`date +%H`h_`date +%M`min_`date +%S`s" fun_assert_exists_on_path_t1 () { local S_NAME_OF_THE_EXECUTABLE=$1 # first function argument local S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} if [ "$S_TMP_1" == "" ] ; then echo "" echo "This bash script requires the \"$S_NAME_OF_THE_EXECUTABLE\" to be on the PATH." echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi } # fun_assert_exists_on_path_t1 fun_assert_exists_on_path_t1 "file" # for checking MIME types fun_assert_exists_on_path_t1 "find" # for recursing fun_assert_exists_on_path_t1 "fossil" # tested with v1.34 fun_assert_exists_on_path_t1 "gawk" fun_assert_exists_on_path_t1 "grep" fun_assert_exists_on_path_t1 "cat" fun_assert_exists_on_path_t1 "ruby" # anything over/equal v.2.1 will probably do fun_assert_exists_on_path_t1 "shred" # for secure delete fun_assert_exists_on_path_t1 "uname" # to check the OS type fun_assert_exists_on_path_t1 "uuidgen" "uuid" # for generating tmp file names fun_assert_exists_on_path_t1 "xargs" # find . -name '*' | xargs blabla fun_assert_exists_on_path_t1 "wc" #-------------------------------------------------------------------------- S_TMP_0="`uname -a | grep -E [Ll]inux`" if [ "$S_TMP_0" == "" ]; then echo "" echo " The classical command line utilities at " echo " different operating systems, for example, Linux and BSD," echo " differ. This script is designed to run only on Linux." echo " If You are willing to risk that some of Your data " echo " is deleted and/or Your operating system instance" echo " becomes permanently flawed, to the point that " echo " it will not even boot, then You may edit the Bash script that " echo " displays this error message by modifying the test that " echo " checks for the operating system type." echo "" echo " If You do decide to edit this Bash script, then " echo " a recommendation is to test Your modifications " echo " within a virtual machine or, if virtual machines are not" echo " an option, as some new operating system user that does not have " echo " any access to the vital data/files." echo " GUID=='61782b5c-e018-4acd-95d1-42e0800180e7'" echo "" echo " Aborting script without doing anything." echo "" exit 1 # exit with error fi #-------------------------------------------------------------------------- SB_EXISTS_ON_PATH_T1_RESULT="f" func_sb_exists_on_path_t1 () { local S_NAME_OF_THE_EXECUTABLE_1="$1" # first function argument #-------- # Function calls like # # func_sb_exists_on_path_t1 "" # func_sb_exists_on_path_t1 " " # func_sb_exists_on_path_t1 "ls ps" # contains a space # # are not allowed. if [ "$S_NAME_OF_THE_EXECUTABLE_1" == "" ] ; then echo "" echo "The Bash function " echo "" echo " func_sb_exists_on_path_t1 " echo "" echo "is not designed to handle an argument that " echo "equals with an empty string." echo "GUID=='13ce522b-56b7-408c-94d1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi local S_TMP_0="`printf \"$S_NAME_OF_THE_EXECUTABLE_1\" | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" if [ "$S_NAME_OF_THE_EXECUTABLE_1" != "$S_TMP_0" ] ; then echo "" echo "The Bash function " echo "" echo " func_sb_exists_on_path_t1 " echo "" echo "is not designed to handle an argument value that contains " echo "spaces or tabulation characters." echo "The received value in parenthesis:($S_NAME_OF_THE_EXECUTABLE_1)." echo "GUID=='2b1a2656-998c-41e0-b1c1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- S_TMP_0="\`which $S_NAME_OF_THE_EXECUTABLE_1 2>/dev/null\`" local S_TMP_1="" local S_TMP_2="S_TMP_1=$S_TMP_0" eval ${S_TMP_2} #---- if [ "$S_TMP_1" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" else SB_EXISTS_ON_PATH_T1_RESULT="t" fi } # func_sb_exists_on_path_t1 #-------------------------------------------------------------------------- S_FUNC_MMMV_GUID_T1_RESULT="not_yet_set" S_FUNC_MMMV_GUID_T1_MODE="" # optim. to skip repeating console tool selection func_mmmv_GUID_t1() { # Does not take any arguments. #-------- #func_mmmv_exc_hash_function_input_verification_t1 "func_mmmv_GUID_t1" "$1" #-------------------- local S_TMP_0="" # declaration local S_TMP_1="" # declaration # Mode selection: if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "" ] ; then SB_EXISTS_ON_PATH_T1_RESULT="f" # if-block init #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="uuidgen" # Linux version func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_GUID_T1_MODE="$S_TMP_0" fi fi #---- if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "f" ] ; then S_TMP_0="uuid" # BSD version func_sb_exists_on_path_t1 "$S_TMP_0" if [ "$SB_EXISTS_ON_PATH_T1_RESULT" == "t" ] ; then S_FUNC_MMMV_GUID_T1_MODE="$S_TMP_0" fi fi #-------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "" ] ; then echo "" echo "All of the GUID generation implementations that this script " echo "is capable of using (uuidgen, uuid) " echo "are missing from the PATH." echo "GUID=='5192d656-1e8f-4fd6-93c1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- if [ "$?" != "0" ]; then echo "" echo "This script is flawed." echo "GUID=='25f74111-7f1d-4197-91c1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------- fi #-------------------- S_FUNC_MMMV_GUID_T1_RESULT="" #-------------------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "uuidgen" ]; then S_TMP_0="`uuidgen`" if [ "$?" != "0" ]; then echo "" echo "The console application \"uuidgen\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`uuidgen`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='17c8dc2d-8a14-444f-84c1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- S_FUNC_MMMV_GUID_T1_RESULT="$S_TMP_0" fi #-------------------- if [ "$S_FUNC_MMMV_GUID_T1_MODE" == "uuid" ]; then S_TMP_0="`uuid`" if [ "$?" != "0" ]; then echo "" echo "The console application \"uuid\" " echo "exited with an error." echo "" echo "----console--outut--citation--start-----" echo "`uuid`" # stdout and stderr echo "----console--outut--citation--end-------" echo "" echo "GUID=='b9e270f1-5720-48d5-bcc1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #---- S_FUNC_MMMV_GUID_T1_RESULT="$S_TMP_0" fi #-------------------- S_TMP_0="`printf \"$S_FUNC_MMMV_GUID_T1_RESULT\" | wc -m | gawk '{gsub(/\s/,"");printf "%s", $1 }'`" S_TMP_1="36" if [ "$S_TMP_0" != "$S_TMP_1" ]; then echo "" echo "According to the GUID specification, IETF RFC 4122, " echo "the lenght of the GUID is " echo "$S_TMP_1 characters, but the result of the " echo "" echo " func_mmmv_GUID_t1" echo "" echo "is something else. The flawed GUID candidate in parenthesis:" echo "($S_FUNC_MMMV_GUID_T1_RESULT)" echo "" echo "The lenght candidate of the flawed GUID candidate in parenthesis:" echo "($S_TMP_0)." echo "" echo "GUID=='cb099b28-40ac-4883-84c1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 # exit with error fi #-------------------- } # func_mmmv_GUID_t1 #-------------------------------------------------------------------------- S_TMP_0="" S_ACTIVITY_OF_THIS_SCRIPT=$1 S_URL_REMOTE_REPOSITORY="" SB_EXIT_WITH_ERROR="f" # needed for scriptability S_ARGNAME_ACTIVITY_SHRED_ARG_2="do_not_prompt_for_confirmation" fun_print_msg_t1() { echo "" echo "The second console argument " echo "is expected to be the URL of the remote repository." } # fun_print_msg_t1 fun_exit_without_any_errors_t1() { local X_SKIP_MESSAGE="$1" if [ "$X_SKIP_MESSAGE" == "" ]; then echo "" echo "Aborting script without doing anything." echo "" fi #---- cd $S_FP_ORIG exit 0 } # fun_exit_without_any_errors_t1 #-------------------------------------------------------------------------- # Activity aliases for comfort. if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "up" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_remote_with_local" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "upload" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_remote_with_local" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "ci" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_remote_with_local" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "down" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_local_with_remote" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "download" ]; then S_ACTIVITY_OF_THIS_SCRIPT="overwrite_local_with_remote" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "co" ]; then S_ACTIVITY_OF_THIS_SCRIPT="clone_all" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "?" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-?" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "--help" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-help" ]; then S_ACTIVITY_OF_THIS_SCRIPT="help" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "rm" ]; then S_ACTIVITY_OF_THIS_SCRIPT="shred_local_copy" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "del" ]; then S_ACTIVITY_OF_THIS_SCRIPT="shred_local_copy" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "delete" ]; then S_ACTIVITY_OF_THIS_SCRIPT="shred_local_copy" fi #-------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "info" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "--info" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-info" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "--about" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "-about" ]; then S_ACTIVITY_OF_THIS_SCRIPT="about" fi #-------- #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "about" ]; then echo "" echo " The initial version of this script has been written by " echo " Martin.Vahi@softf1.com " echo " in 2016_02. The initial version is in public domain." echo " The command \"help\" offers more information. " echo "" echo " Thank You for using this script :-)" echo "" echo "" fun_exit_without_any_errors_t1 "t" fi #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "exit" ]; then fun_exit_without_any_errors_t1 else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_all" ]; then if [ "$2" == "" ]; then fun_print_msg_t1 S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" else S_URL_REMOTE_REPOSITORY="$2" fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_public" ]; then if [ "$2" == "" ]; then fun_print_msg_t1 S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" else S_URL_REMOTE_REPOSITORY="$2" fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" != "overwrite_local_with_remote" ]; then if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "overwrite_remote_with_local" ]; then if [ "$2" != "" ]; then if [ "$2" == "use_autogenerated_commit_message" ]; then if [ "$3" != "" ]; then echo "" echo "If the first console argument is \"overwrite_local_with_remote\" and" echo "the second console argument is \"use_autogenerated_commit_message\", " echo "then there should not be a 3. console argument." echo "GUID=='25ec1eb1-c417-45e4-a3c1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi else if [ "$2" == "read_commit_message_from_file" ]; then S_FP_MESSAGE_FILE_CANDIDATE="$3" # file path candidate if [ "$S_FP_MESSAGE_FILE_CANDIDATE" == "" ]; then echo "" echo "If the first console argument is " echo "\"overwrite_local_with_remote\" and" echo "the second console argument is " echo "\"read_commit_message_from_file\", " echo "then there should be also a 3. console argument " echo "that is expected to be a file path to a text file." echo "GUID=='22d36238-7319-44df-94c1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then if [ "$4" != "" ]; then echo "" echo "If the first console argument is " echo "\"overwrite_local_with_remote\" and" echo "the second console argument is " echo "\"read_commit_message_from_file\", " echo "then there should be exactly 3. console arguments, " echo "not 4 or more. Unfortunately the 4. argument is currently " echo "---citation--start---" echo "$4" echo "---citation--end-----" echo "GUID=='82b95a2e-d998-42d9-85b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then if [ ! -e "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then echo "" echo "The commit message file path candidate " echo "references either a missing file or " echo "a broken symlink." echo "GUID=='2c96ab55-cde4-4f75-83b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then if [ -d "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then echo "" echo "The commit message file path candidate " echo "references a folder, but it should " echo "reference a text file." echo "GUID=='6033bc44-becc-49dc-b2b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then S_TMP_0="`filesize $S_FP_MESSAGE_FILE_CANDIDATE`" S_TMP_1="`ruby -e \"s_out='OK'; if (2000<$S_TMP_0) then s_out='too_big' end; print(s_out);\"`" if [ "$S_TMP_1" == "too_big" ]; then echo "" echo "The commit message file path " echo "references a file that has a size of $S_TMP_0 bytes." echo "The suspicion is that it is a wrong file. " echo "because a commit message is usually not that lengthy." echo "GUID=='29330323-2f96-4065-b1b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" else if [ "$S_TMP_0" == "0" ]; then echo "" echo "The commit message file path " echo "references a file that has a size of 0 (zero) bytes." echo "" echo "The generation of commit message files " echo "can be avoided by using the option " echo "" echo " \"use_autogenerated_commit_message\"" echo "" echo "in stead of the option " echo "" echo " \"read_commit_message_from_file\" ." echo "" echo "GUID=='8d218548-7102-4c19-b4b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi fi if [ "$SB_EXIT_WITH_ERROR" == "f" ]; then S_TMP_0="`file --mime-type $S_FP_MESSAGE_FILE_CANDIDATE | grep text `" if [ "$S_TMP_0" == "" ]; then echo "" echo "The commit message file path " echo "references a file that has a MIME type of " echo "" echo "`file --mime-type $S_FP_MESSAGE_FILE_CANDIDATE`" echo "" echo "The commit message file must be a text file and " echo "text files have the string \"text\" in their MIME type name." echo "GUID=='5b813cf1-4908-45e9-91b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi fi # read_commit_message_from_file fi fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "shred_local_copy" ]; then if [ "$2" != "" ]; then # the 2. arg is optional here if [ "$2" != "$S_ARGNAME_ACTIVITY_SHRED_ARG_2" ]; then echo "" echo "If the first console argument is \"shred_local_copy\", then" echo "the second console argument is allowed to be only " echo "" echo " \"$S_ARGNAME_ACTIVITY_SHRED_ARG_2\", without quotation marks." echo "GUID=='666fb445-f5b0-4a7f-92b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi else if [ "$S_ACTIVITY_OF_THIS_SCRIPT" != "print_script_version" ]; then if [ "$S_ACTIVITY_OF_THIS_SCRIPT" != "help" ]; then echo "" echo "The very first console argument " echo "of this script is expected to be " echo "a command that is specific to this script." echo "GUID=='3b955712-bcfb-44f6-b3b1-42e0800180e7'" S_ACTIVITY_OF_THIS_SCRIPT="help" SB_EXIT_WITH_ERROR="t" fi fi fi fi fi fi fi fi #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "help" ]; then echo "" echo "Possible console argument sets are:" echo "" echo " clone_all <remote repository url>" echo " clone_public <remote repository url>" echo " overwrite_local_with_remote" echo "" echo " overwrite_remote_with_local (use_autogenerated_commit_message)?" echo " overwrite_remote_with_local read_commit_message_from_file <path to a text file>" echo "" echo " shred_local_copy ($S_ARGNAME_ACTIVITY_SHRED_ARG_2)?" echo " help" echo " print_script_version" echo " exit # just for testing" echo "" #---- cd $S_FP_ORIG if [ "$SB_EXIT_WITH_ERROR" == "t" ]; then exit 1 # To let the parent script know that # the parent script calls this script with # flawed console argument values. else exit 0 fi fi #-------------------------------------------------------------------------- # The script version is needed by other scripts that depend on this script. # The script version GUID must not be surrounded by # any quote signs (',"), because otherwise the # version GUID will be overwritten by the UpGUID tool, # but unlike error message GUID-s this GUID must stay constant. # To allow the version to be used as sub-part of file names and # folder names, the version must not contain any spaces, line breaks # and other characters that have a special meaning in Bash. # # If the version ID did not match the GUID regex, then I would have to # write a long comment about it not being allowed to match the # GUID regex. :-D S_VERSION_OF_THIS_SCRIPT="5e72de55-a03d-417b-9cd1-42e0800180e7" if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "print_script_version" ]; then echo "The version of this script is: $S_VERSION_OF_THIS_SCRIPT" #---- cd $S_FP_ORIG exit 0 fi #-------------------------------------------------------------------------- S_FP_SANDBOX_DIRECTORY_NAME="sandbox_of_the_Fossil_repository" S_FP_SANDBOX="$S_FP_DIR/$S_FP_SANDBOX_DIRECTORY_NAME" #---- S_FP_ARCHIVES_DIRECTORY_NAME="archival_copies_of_the_Fossil_repository_sandbox" S_FP_ARCHIVES="$S_FP_DIR/$S_FP_ARCHIVES_DIRECTORY_NAME" S_FP_ARCHIVES_TS="$S_FP_ARCHIVES/v$S_TIMESTAMP" #---- S_FP_FOSSILFILE_NAME="repository_storage.fossil" S_FP_FOSSILFILE="$S_FP_DIR/$S_FP_FOSSILFILE_NAME" #-------- S_LC_NOT_DETERMINED="not determined" SB_SANDBOX_DIR_EXISTS="$S_LC_NOT_DETERMINED" fun_sandbox_folder_or_symlink_exists() { SB_SANDBOX_DIR_EXISTS="f" if [ ! -e $S_FP_SANDBOX ]; then # Does not exist or it is a broken symbolic link. SB_SANDBOX_DIR_EXISTS="f" else if [ -d $S_FP_SANDBOX ]; then SB_SANDBOX_DIR_EXISTS="t" fi fi } # fun_sandbox_folder_or_symlink_exists SB_FOSSILFILE_EXISTS="$S_LC_NOT_DETERMINED" fun_fossil_repository_file_or_symlink_exists() { SB_FOSSILFILE_EXISTS="t" if [ ! -e $S_FP_FOSSILFILE ]; then # Does not exist or it is a broken symbolic link. SB_FOSSILFILE_EXISTS="f" else if [ -d $S_FP_FOSSILFILE ]; then SB_FOSSILFILE_EXISTS="f" fi fi } # fun_fossil_repository_file_or_symlink_exists S_LC_NOT_DETERMINED="not determined" SB_ARCHIVE_DIR_EXISTS="$S_LC_NOT_DETERMINED" fun_archives_folder_or_symlink_exists() { SB_ARCHIVE_DIR_EXISTS="f" if [ ! -e $S_FP_ARCHIVES ]; then # Does not exist or it is a broken symbolic link. SB_ARCHIVE_DIR_EXISTS="f" else if [ -d $S_FP_ARCHIVES ]; then SB_ARCHIVE_DIR_EXISTS="t" fi fi } # fun_archives_folder_or_symlink_exists #-------- fun_fossil_repository_file_or_symlink_exists fun_sandbox_folder_or_symlink_exists fun_archives_folder_or_symlink_exists fun_assertion_t1() { local SB_CANDIDATE=$1 local SB_THROW="t" #---- if [ "$SB_CANDIDATE" == "t" ]; then SB_THROW="f" else if [ "$SB_CANDIDATE" == "f" ]; then SB_THROW="f" fi fi #---- if [ "$SB_THROW" == "t" ]; then echo "" echo "This Bash script is flawed. " echo "fun_assertion_t1() assertion failed." echo "GUID=='29da426c-b117-441e-93b1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_assertion_t1 fun_assertion_t1 "$SB_FOSSILFILE_EXISTS" fun_assertion_t1 "$SB_SANDBOX_DIR_EXISTS" fun_assertion_t1 "$SB_ARCHIVE_DIR_EXISTS" #-------------------------------------------------------------------------- fun_assert_repository_local_copy_existence() { fun_fossil_repository_file_or_symlink_exists if [ "$SB_FOSSILFILE_EXISTS" == "f" ]; then echo "" echo "The directory " echo "`pwd`" echo "does not contain a Fossil repository file named " echo "" echo " $S_FP_FOSSILFILE_NAME" echo "" echo "Aborting script." echo "GUID=='5950191d-deaf-4abf-a1a1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi fun_sandbox_folder_or_symlink_exists if [ "$SB_SANDBOX_DIR_EXISTS" == "f" ]; then echo "" echo "The directory " echo "`pwd`" echo "does not contain a directory named " echo "" echo " $S_FP_SANDBOX_DIRECTORY_NAME" echo "" echo "Aborting script." echo "GUID=='653dfc68-75da-4e5b-8ea1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_assert_repository_local_copy_existence fun_assert_the_lack_of_repository_local_copy_t1() { if [ "$SB_FOSSILFILE_EXISTS" == "t" ]; then echo "" echo "The directory " echo "`pwd`" echo "already contain a file named " echo "" echo " $S_FP_FOSSILFILE_NAME" echo "" echo "To avoid overwriting an existing local copy, this script is aborted" echo "and nothing is downloaded/uploaded by this script." echo "GUID=='d6e07f2d-e707-44c5-a5a1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$SB_SANDBOX_DIR_EXISTS" == "t" ]; then echo "" echo "The directory " echo "`pwd`" echo "already contains a directory named " echo "" echo " $S_FP_SANDBOX_DIRECTORY_NAME" echo "" echo "To avoid overwriting an existing local copy, this script is aborted" echo "and nothing is downloaded/uploaded by this script." echo "GUID=='da297b50-e286-423d-93a1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_assert_the_lack_of_repository_local_copy_t1 fun_initialize_sandbox_t1() { mkdir -p $S_FP_SANDBOX sync; cd $S_FP_SANDBOX fossil open $S_FP_DIR/$S_FP_FOSSILFILE_NAME # full path for reliability fossil settings autosync off ; fossil settings case-sensitive TRUE ; fossil checkout --force --latest fossil pull fossil close sync; } # fun_initialize_sandbox_t1 #-------------------------------------------------------------------------- fun_last_minute_checks_t1() { # Last minute checks, just to be sure. local S_FP_FORBIDDEN_VALUE=$1 if [ "$S_FP_FORBIDDEN_VALUE" == "/" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='c1d71016-36d5-40de-b4a1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "$HOME" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='4eed6a14-0b10-41a7-8aa1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/home" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='8e3a2d2e-8602-4a57-a2a1-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/root" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='16d5bccc-3d47-4536-8591-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/etc" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='407a2041-4672-4819-8391-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ "$S_FP_FORBIDDEN_VALUE" == "/usr" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='f121833f-5f5a-4f4b-8391-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi } # fun_last_minute_checks_t1 #-------------------------------------------------------------------------- SB_FOLDER_IS_EMPTY="$S_LC_NOT_DETERMINED" fun_folder_is_empty_t1() { local S_FP_FOLDER_TO_STUDY=$1 local S_FP_ORIG_LOCAL="`pwd`" #-------- SB_FOLDER_IS_EMPTY="t" local S_TMP_0="`cd $S_FP_FOLDER_TO_STUDY; ls -l | grep \"total 0\"`" if [ "$S_TMP_0" == "" ]; then SB_FOLDER_IS_EMPTY="f" fi #-------- cd $S_FP_ORIG_LOCAL # just in case } # fun_folder_is_empty_t1 fun_folder_is_empty_t1 "$S_FP_DIR" fun_assertion_t1 "$SB_FOLDER_IS_EMPTY" if [ "$SB_FOLDER_IS_EMPTY" == "t" ]; then echo "" echo "This Bash script is flawed. The " echo "$S_FP_DIR" echo "can not possibly be empty, because it contains " echo "at least one file, whcih is " echo "this very same Bash script that outputs the current error message." echo "GUID=='c4a3f01e-dd50-43b5-bf91-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi #-------------------------------------------------------------------------- fun_activity_core_overwrite_local_with_remote() { fun_assert_repository_local_copy_existence #-------- # The checks are party to cope with the `whoami`=="root" case. fun_last_minute_checks_t1 "$S_FP_SANDBOX" fun_last_minute_checks_t1 "$S_FP_ARCHIVES" fun_last_minute_checks_t1 "$S_FP_ARCHIVES_TS" #-------- chmod -f -R u+rx $S_FP_SANDBOX fun_folder_is_empty_t1 "$S_FP_SANDBOX" if [ "$SB_FOLDER_IS_EMPTY" == "f" ]; then # This if-statement is needed because the # cp -f -R AnEmptyDirectory/* ToSomewhere/ # gives an error. #---- mkdir -p $S_FP_ARCHIVES_TS #---- # The "chmod -f -R " is not used because it would # waste time on folders that are named by # the older $S_FP_ARCHIVES_TS values. chmod -f 0700 $S_FP_ARCHIVES chmod -f 0700 $S_FP_ARCHIVES_TS #---- # The separate cp and rm of the sandbox # contents is to somewhat retain the original # file premissions of the sandbox contents. cp -f -R $S_FP_SANDBOX/* $S_FP_ARCHIVES_TS/ fun_last_minute_checks_t1 "$S_FP_SANDBOX" chmod -f -R u+rwx $S_FP_SANDBOX rm -fr $S_FP_SANDBOX/* fi #-------- cd $S_FP_SANDBOX fossil open $S_FP_DIR/$S_FP_FOSSILFILE_NAME # full path for reliability fossil settings autosync off ; fossil checkout --force --latest fossil pull fossil close } # fun_activity_core_overwrite_local_with_remote if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "overwrite_local_with_remote" ]; then fun_activity_core_overwrite_local_with_remote #---- cd $S_FP_ORIG exit 0 fi # overwrite_local_with_remote #-------------------------------------------------------------------------- fossil close 2>/dev/null if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_public" ]; then fun_assert_the_lack_of_repository_local_copy_t1 cd $S_FP_DIR fossil clone $S_URL_REMOTE_REPOSITORY ./$S_FP_FOSSILFILE_NAME fun_initialize_sandbox_t1 cd $S_FP_ORIG #---- sync fun_activity_core_overwrite_local_with_remote cd $S_FP_ORIG sync #---- exit 0 fi # clone_public #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "clone_all" ]; then fun_assert_the_lack_of_repository_local_copy_t1 cd $S_FP_DIR #-------- S_USERNAME="" while [ "$S_USERNAME" == "" ] do echo "" echo "Please enter a username: " S_USERNAME="`ruby -e \"s=gets.gsub(/[\n\r\s]/,'');print(s)\"`" S_URL="`export S_USERNAME=\"$S_USERNAME\"; S_URL=\"$S_URL_REMOTE_REPOSITORY\" ruby -e 's_0=ENV[\"S_URL\"].sub(\"http://\",\"http:/\").sub(\"http:/\",\"http://\"+ENV[\"S_USERNAME\"].to_s+\":nonsensepassword@\");print(s_0)'`" done #-------- fossil clone --private $S_URL ./$S_FP_FOSSILFILE_NAME fun_initialize_sandbox_t1 cd $S_FP_ORIG #---- sync fun_activity_core_overwrite_local_with_remote cd $S_FP_ORIG sync #---- exit 0 fi # clone_all #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "overwrite_remote_with_local" ]; then fun_assert_repository_local_copy_existence #-------- # It's important that this script will not try # to recursively copy/move the content of the "/" to # a subfolder of the "/", the "/tmp". # The other folders that are covered by the # test are a bit of an overkill here, may be even an # annoying and unjustified restrictions, but # in most cases those restrictions do not hurt either. fun_last_minute_checks_t1 "$S_FP_SANDBOX" #---- S_TMP_0="/tmp/tmp_mmmv_$S_VERSION_OF_THIS_SCRIPT" S_TMP_1="__" #-- func_mmmv_GUID_t1 S_TMP_FOR_LOCAL="$S_TMP_0$S_TMP_1$S_FUNC_MMMV_GUID_T1_RESULT" #-- func_mmmv_GUID_t1 S_TMP_FOR_COMMIT_MESSAGE="$S_TMP_0$S_TMP_1$S_FUNC_MMMV_GUID_T1_RESULT" mkdir -p $S_TMP_FOR_LOCAL chmod -f -R u+rwx $S_FP_SANDBOX mv -f $S_FP_SANDBOX/* $S_TMP_FOR_LOCAL/ # the -f is for empty sandbox #-------- fun_activity_core_overwrite_local_with_remote fun_last_minute_checks_t1 "$S_FP_SANDBOX" # should there be flaws elsewhere chmod -f -R u+rwx $S_FP_SANDBOX # to be able to delete the old content #-------- cd $S_FP_SANDBOX fossil open $S_FP_DIR/$S_FP_FOSSILFILE_NAME # full path for reliability fossil settings autosync off ; fun_folder_is_empty_t1 "$S_FP_SANDBOX" SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED="f" if [ "$SB_FOLDER_IS_EMPTY" == "f" ]; then fossil rm --hard --case-sensitive TRUE ./* SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED="t" fun_last_minute_checks_t1 "`pwd`" if [ "$S_FP_SANDBOX" == "`pwd`" ]; then rm -fr ./* else echo "" echo "This Bash script is flawed." echo "GUID=='c217ab1a-3f04-4320-b391-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi fi mv -f $S_TMP_FOR_LOCAL/* $S_FP_SANDBOX/ # the -f is for empty source #---- fun_last_minute_checks_t1 "$S_TMP_FOR_LOCAL" rm -fr $S_TMP_FOR_LOCAL #---- fun_folder_is_empty_t1 "$S_FP_SANDBOX" if [ "$SB_FOLDER_IS_EMPTY" == "f" ]; then if [ "$S_FP_SANDBOX" != "`pwd`" ]; then echo "" echo "This Bash script is flawed." echo "GUID=='5ddc6156-c835-44f0-a491-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi find . -name '*' | xargs fossil add --force --dotfiles --case-sensitive TRUE SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED="t" fi if [ "$SB_SANDBOX_CONTENT_MIGHT_HAVE_BEEN_CHANGED" == "t" ]; then if [ "$2" == "" ]; then echo "" #echo "Please enter a one-liner commit message: " #S_TMP_0="`ruby -e \"s=gets.gsub(/[\n\r\s]/,'');print(s)\"`" # TODO: improve this script so that it would not ask # for a commit message, when nothing changed. It requires # some recursive analysis of files, which might be slow. # This script is not optimal for speed even now and that would # make it even slower. On the other hand, usually when # the upload operation is initiated, there are some changes, # which means that the slow analysis would be useless in # most frequent cases. So this thing needs to be figured out # at some later time, when there is more experience with the # use of this script. read -p "Please enter a one-liner commit message: " S_TMP_0 echo $S_TMP_0 > $S_TMP_FOR_COMMIT_MESSAGE else if [ "$2" == "use_autogenerated_commit_message" ]; then echo "Autogenerated commit message timestamp: $S_TIMESTAMP" > $S_TMP_FOR_COMMIT_MESSAGE else if [ "$2" == "read_commit_message_from_file" ]; then S_FP_MESSAGE_FILE_CANDIDATE="$3" # file path candidate # Initial file existence and type checks for the # $S_FP_MESSAGE_FILE_CANDIDATE # were conducted at the start of the script. # but the $S_FP_MESSAGE_FILE_CANDIDATE might have # referenced a file in the sandbox and # that file might have been just removed/deleted. # # There is no threat that the file got changed to a folder # or a symlink switched from a file to a folder, # at least that's the case for the single threaded model. if [ ! -e "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then # missing or a broken symlink echo "" echo "The commit message file is missing or " echo "references a broken symlink." echo "The file or symlink to it was fine at " echo "the start of this script, it passed the various tests, " echo "but for some reason it got deleted or its target . " echo "got deleted. If the commit message file or" echo "the symlink target resided within the sandbox, then " echo "a recommendation is to use a file that resides " echo "outside of the sandbox." echo "GUID=='549bc742-cdbf-43a6-8291-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi if [ -d "$S_FP_MESSAGE_FILE_CANDIDATE" ]; then # folder or a symlink to a folder echo "" echo "The commit message file path does not reference " echo "a file. It references a folder or a symlink to a folder." echo "The file or symlink to it was fine at " echo "the start of this script, it passed the various tests, " echo "but for some reason there were changes. " echo "GUID=='305146e5-d1d0-41c3-8591-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 fi cat $S_FP_MESSAGE_FILE_CANDIDATE > $S_TMP_FOR_COMMIT_MESSAGE # else # Due to the checks at the start of the script # this else branch is useless. fi fi fi #-------- fossil commit --message-file $S_TMP_FOR_COMMIT_MESSAGE #---- fun_last_minute_checks_t1 "$S_TMP_FOR_COMMIT_MESSAGE" rm -f $S_TMP_FOR_COMMIT_MESSAGE #---- fi #-------- fossil push --private fossil push fossil pull --private fossil close #---- cd $S_FP_ORIG exit 0 fi # overwrite_remote_with_local #-------------------------------------------------------------------------- if [ "$S_ACTIVITY_OF_THIS_SCRIPT" == "shred_local_copy" ]; then #-------- SB_THERE_IS_SOMETHING_TO_DELETE="f" if [ "$SB_FOSSILFILE_EXISTS" == "t" ]; then SB_THERE_IS_SOMETHING_TO_DELETE="t" fi if [ "$SB_SANDBOX_DIR_EXISTS" == "t" ]; then SB_THERE_IS_SOMETHING_TO_DELETE="t" fi if [ "$SB_ARCHIVE_DIR_EXISTS" == "t" ]; then SB_THERE_IS_SOMETHING_TO_DELETE="t" fi #-------- if [ "$SB_THERE_IS_SOMETHING_TO_DELETE" == "t" ]; then if [ "$2" != "$S_ARGNAME_ACTIVITY_SHRED_ARG_2" ]; then # Includes the $2=="" case # id est if the control flow is in here, then there # is a need to prompt for confirmation. # The skipping of the prompt is necessary for # software that use this script as its sub-component. #-------- echo "" echo "The command \"shred_local_copy\" deletes " echo "the repository file, the sandbox and " echo "the associated automatically created archives." echo "" read -p "Proceed with deletion? (Yes/whatever_else) " S_TMP_0 S_TMP_1="`echo $S_TMP_0 | gawk '{print tolower($1)}'`" if [ "$S_TMP_1" == "yes" ]; then echo "" printf "Deleting ... " else fun_exit_without_any_errors_t1 fi fi fi #-------- if [ "$SB_FOSSILFILE_EXISTS" == "t" ]; then cd $S_FP_DIR # just in case # The shred "-f" option re-sets file access permissions as needed. nice -n10 shred -f --remove $S_FP_FOSSILFILE fi #-------- if [ "$SB_SANDBOX_DIR_EXISTS" == "t" ]; then cd $S_FP_SANDBOX fun_last_minute_checks_t1 "`pwd`" #-------- # The S_TMP_0 is to suppress shred output. S_TMP_0="`find . -name '*' | xargs shred -f --remove 2>/dev/null`" #---- cd $S_FP_DIR # step out of the sandbox directory fun_last_minute_checks_t1 "$S_FP_SANDBOX" chmod -f -R 0700 $S_FP_SANDBOX rm -fr $S_FP_SANDBOX fi #-------- if [ "$SB_ARCHIVE_DIR_EXISTS" == "t" ]; then cd $S_FP_ARCHIVES fun_last_minute_checks_t1 "`pwd`" #-------- # The S_TMP_0 is to suppress shred output. S_TMP_0="`find . -name '*' | xargs shred -f --remove 2>/dev/null`" #---- cd $S_FP_DIR # step out of the archive directory fun_last_minute_checks_t1 "$S_FP_ARCHIVES" chmod -f -R 0700 $S_FP_ARCHIVES rm -fr $S_FP_ARCHIVES fi #-------- if [ "$SB_THERE_IS_SOMETHING_TO_DELETE" == "t" ]; then if [ "$2" != "$S_ARGNAME_ACTIVITY_SHRED_ARG_2" ]; then echo "✓" echo "" fi fi #-------- cd $S_FP_ORIG exit 0 fi # shred_local_copy #-------------------------------------------------------------------------- # All possible actions must have been described # above this code block. echo "" echo "This Bash script is flawed." echo "GUID=='450c2dad-e133-4bc1-8681-42e0800180e7'" echo "" #---- cd $S_FP_ORIG exit 1 #========================================================================== |