diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-10-04 01:26:44 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2020-07-06 07:39:33 +0200 |
commit | 1b941c7782f07c61c61be36d7772a5c0ee9c420e (patch) | |
tree | 5eaeff7806c1bea62e0d87900871391a10dd6b1a /scripts | |
parent | 48ad8c87fd6cc901a4616f3ef02e7f163459a4c5 (diff) |
Fix package scripts for older distros
Tested on ubuntu 12.04
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/download_dependencies.sh | 16 | ||||
-rwxr-xr-x | scripts/package.py | 2 |
2 files changed, 10 insertions, 8 deletions
diff --git a/scripts/download_dependencies.sh b/scripts/download_dependencies.sh index 8349068..ff68267 100755 --- a/scripts/download_dependencies.sh +++ b/scripts/download_dependencies.sh @@ -48,18 +48,20 @@ fi mkdir -p "$program_libs_dir" set +e +echoerr() { echo "$@" 1>&2; } + for (( i=0; i<${#dependencies[@]}; i=$i+2 )) do file=${dependencies[i]} checksum_file="$file".sha1 checksum=${dependencies[i+1]} - if [ -f /usr/lib/sibs/"$file" ] && [ "$checksum" == "$(cat /usr/lib/sibs/$checksum_file)" ]; then - #echo "Using sibs global lib file $file" - elif [ $is_root -eq 0 ] && [ -f ~/.local/lib/sibs/"$file" ] && [ "$checksum" == "$(cat ~/.local/lib/sibs/$checksum_file)" ]; then - #echo "Using sibs user lib file $file" + if [ -f /usr/lib/sibs/"$file" ] && [ "$checksum" == "$(cat /usr/lib/sibs/$checksum_file)" ]; then + echoerr "Using sibs global lib file $file" + elif [ $is_root -eq 0 ] && [ -f ~/.local/lib/sibs/"$file" ] && [ "$checksum" == "$(cat ~/.local/lib/sibs/$checksum_file)" ]; then + echoerr "Using sibs user lib file $file" elif [ -f /usr/lib/"$file" ] && echo "$checksum" /usr/lib/"$file" | sha1sum -c --status; then - #echo "Using system lib file $file" + echoerr "Using system lib file $file" set -e if [ $is_root -eq 0 ]; then cp /usr/lib/"$file" ~/.local/lib/sibs/"$file" @@ -79,8 +81,8 @@ do dst_dir=/usr/lib/sibs fi - #echo "Downloading missing library from $url/$file" - if wget -q --show-progress -O "$dst_dir/$file" "$url/$file"; then + echoerr "Downloading missing library from ${url}${file}" + if wget -q -O "$dst_dir/$file" "$url""$file"; then echo "$checksum" > "$dst_dir/$checksum_file" downloaded=1 break diff --git a/scripts/package.py b/scripts/package.py index 3d2ae92..fe3b468 100755 --- a/scripts/package.py +++ b/scripts/package.py @@ -19,7 +19,7 @@ script_dir=`dirname $script_path` program_full_name="$PROGRAM_FULL_NAME" $DOWNLOAD_DEPENDENCIES_COMMAND -"$script_dir/$SO_LOADER" --library-path "$script_dir/libs":~/.local/lib/sibs/"$program_full_name":/usr/lib/sibs/"$program_full_name" "$script_dir/$PROGRAM_NAME" "$@" +"$script_dir/$SO_LOADER" --library-path "$script_dir/libs":$HOME/.local/lib/sibs/"$program_full_name":/usr/lib/sibs/"$program_full_name" "$script_dir/$PROGRAM_NAME" "$@" """ def get_executable_dynamic_libraries(filepath): |