Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- root="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
- command="Crea"
- export LD_LIBRARY_PATH="$root/lib:$LD_LIBRARY_PATH"
- VERSION=8
- CURRENT_VERSION=0
- if [[ -f "$root/lib/version" ]]
- then
- read -r CURRENT_VERSION<"$root/lib/version"
- fi
- if [[ $CURRENT_VERSION != $VERSION ]]
- then
- find "$root/lib/" -type l | xargs rm
- echo $VERSION > "$root/lib/version"
- fi
- if [[ ! -f "$root/lib/libsfml-system.so" ]]; then
- pushd $root/lib > /dev/null
- # Start over with the symbolic links
- rm -f $(find . -type l)
- # For each libfoobar.so.x.y.z, provide libfoobar.so.x.y, libfoobar.so.x,
- # and libfoobar.so
- for file in $(find . -type f -name '*.so.*'); do
- while true; do
- chomped=$(echo $file | sed -e 's/\.[^.]*$//')
- ln -s $file $chomped
- if [[ $chomped =~ \.so$ ]]; then
- break
- fi
- file="$chomped"
- done
- done
- popd > /dev/null
- fi
- exec "$root/bin/Crea" "$@"
Advertisement
Add Comment
Please, Sign In to add comment