devel
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | #************************************************************ |
|---|
| 3 | # Download TOL Default Packages to the installation folder. |
|---|
| 4 | # /!\ Not necessary any more. TOL CMake already do that. |
|---|
| 5 | #************************************************************ |
|---|
| 6 | |
|---|
| 7 | MACHINE_TYPE=`uname -m` |
|---|
| 8 | if [ ${MACHINE_TYPE} = 'x86_64' ]; then |
|---|
| 9 | tol_platform=Linux32GNU |
|---|
| 10 | else |
|---|
| 11 | tol_platform=Linux64GNU |
|---|
| 12 | fi |
|---|
| 13 | |
|---|
| 14 | echo "Download default packages for $tol_platform" |
|---|
| 15 | echo |
|---|
| 16 | |
|---|
| 17 | dest=/usr/local/tol3.2-release/bin/stdlib/DefaultPackages |
|---|
| 18 | if ! [ -d "$dest" ]; then |
|---|
| 19 | echo "/!\ Cannot find '$dest'" |
|---|
| 20 | exit 1 |
|---|
| 21 | fi |
|---|
| 22 | |
|---|
| 23 | # == WGET =============================== |
|---|
| 24 | # wget version should have option --content-disposition. |
|---|
| 25 | cd $dest |
|---|
| 26 | |
|---|
| 27 | # Deletes previous packages if they exist. |
|---|
| 28 | sudo rm -f *.zip* |
|---|
| 29 | |
|---|
| 30 | echo "### Downloading StdLib ###" |
|---|
| 31 | sudo wget --content-disposition "http://packages.tol-project.org/OfficialTolArchiveNetwork/repository.php?action=download&format=attachment&tol_package_version=4&package=StdLib" |
|---|
| 32 | |
|---|
| 33 | echo "### Downloading TclCore ###" |
|---|
| 34 | sudo wget --content-disposition "http://packages.tol-project.org/OfficialTolArchiveNetwork/repository.php?action=download&format=attachment&tol_package_version=4&package=TclCore%23$tol_platform" |
|---|
| 35 | # ======================================= |
|---|
| 36 | |
|---|
| 37 | ok=1 |
|---|
| 38 | |
|---|
| 39 | if ! [ -f StdLib.*.*.zip ]; then |
|---|
| 40 | ok=0 |
|---|
| 41 | ls $dest |
|---|
| 42 | echo "/!\ Package StdLib cannot be downloaded." |
|---|
| 43 | fi |
|---|
| 44 | if ! [ -f TclCore#$tol_platform.*.*.zip ]; then |
|---|
| 45 | ok=0 |
|---|
| 46 | echo "/!\ Package TclCore cannot be downloaded for '$tol_platform'" |
|---|
| 47 | fi |
|---|
| 48 | |
|---|
| 49 | if [ "$ok" = "1" ]; then |
|---|
| 50 | echo "Default packages correctly downloaded." |
|---|
| 51 | exit 0 |
|---|
| 52 | fi |
|---|
| 53 | |
|---|
| 54 | exit 2 |
|---|
Note: See
TracBrowser
for help on using the repository browser.