From 497aaad107a83da3d291e86672bebed0cc05e3b0 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Sat, 19 Apr 2025 18:04:20 +0200 Subject: [PATCH 1/4] Add script tune --- bin/tune | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 bin/tune diff --git a/bin/tune b/bin/tune new file mode 100644 index 000000000..a2eb431d7 --- /dev/null +++ b/bin/tune @@ -0,0 +1,16 @@ +#!/bin/bash -eu + +if [[ $(basename $(pwd)) == "bin" ]]; then + cd .. +fi + +# check Julia version + +# check that the active manifest is the default manifest + +# create new prob_xxx.bin file +# copy it to the prob_xxx.bin.default file +# run xz + +# delete the relevant compiled package folder +# load the package From f4a95eeea17cdf7c5886bc92a968ef059570eeb5 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 24 Apr 2025 17:13:56 +0200 Subject: [PATCH 2/4] Some progress --- bin/tune | 13 +++++++++++++ 1 file changed, 13 insertions(+) mode change 100644 => 100755 bin/tune diff --git a/bin/tune b/bin/tune old mode 100644 new mode 100755 index a2eb431d7..a54b2e0ce --- a/bin/tune +++ b/bin/tune @@ -5,8 +5,21 @@ if [[ $(basename $(pwd)) == "bin" ]]; then fi # check Julia version +julia_version=$(julia --version | awk '{print($3)}') +julia_major=${julia_version:0:3} +if [[ $julia_major == "1.1" ]]; then + julia_major=${julia_version:0:4} +fi # check that the active manifest is the default manifest +file1="Manifest-v1.11.toml" +file2="Manifest-v1.11.toml.default" + +if cmp -s "$file1" "$file2"; then + printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" +else + printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" +fi # create new prob_xxx.bin file # copy it to the prob_xxx.bin.default file From 85059d9b9e4d79c716b78cfe7bd1141112cff288 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 24 Apr 2025 17:19:50 +0200 Subject: [PATCH 3/4] Improve script --- bin/tune | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bin/tune b/bin/tune index a54b2e0ce..5529caae2 100755 --- a/bin/tune +++ b/bin/tune @@ -12,8 +12,13 @@ if [[ $julia_major == "1.1" ]]; then fi # check that the active manifest is the default manifest -file1="Manifest-v1.11.toml" -file2="Manifest-v1.11.toml.default" +if [[ $julia_major == "1.10" ]]; then + file1="Manifest-v1.10.toml" + file2="Manifest-v1.10.toml.default" +else + file1="Manifest-v1.11.toml" + file2="Manifest-v1.11.toml.default" +fi if cmp -s "$file1" "$file2"; then printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" From eb2cebdd74085ceeb08e7f16409165193ba88f27 Mon Sep 17 00:00:00 2001 From: Uwe Fechner Date: Thu, 24 Apr 2025 17:38:09 +0200 Subject: [PATCH 4/4] Improve script --- bin/tune | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/tune b/bin/tune index 5529caae2..e59615e36 100755 --- a/bin/tune +++ b/bin/tune @@ -20,10 +20,10 @@ else file2="Manifest-v1.11.toml.default" fi -if cmp -s "$file1" "$file2"; then - printf 'The file "%s" is the same as "%s"\n' "$file1" "$file2" -else +if ! cmp -s "$file1" "$file2"; then printf 'The file "%s" is different from "%s"\n' "$file1" "$file2" + echo "Aborting..." + exit fi # create new prob_xxx.bin file