|
|
@ -8,7 +8,7 @@ dir_source="$PWD/source" |
|
|
|
dir_install="$PWD/install" |
|
|
|
cmd_download="curl -#L -o {dst} {src}" |
|
|
|
cmd_extract="tar xf {src}" |
|
|
|
enable_movedirs=true |
|
|
|
enable_movedirs=false |
|
|
|
enable_check=true |
|
|
|
if [ -f /etc/astronaut.conf ]; then |
|
|
|
. /etc/astronaut.conf |
|
|
@ -118,7 +118,7 @@ download() { |
|
|
|
extract() { |
|
|
|
msg "Extracting $1" |
|
|
|
if [ "$2" ]; then |
|
|
|
local cmd="$2" |
|
|
|
local cmd="$2" |
|
|
|
else |
|
|
|
local cmd="$cmd_extract" |
|
|
|
fi |
|
|
@ -144,12 +144,15 @@ extrafile() { |
|
|
|
} |
|
|
|
|
|
|
|
do_check() { |
|
|
|
if $enable_check; then |
|
|
|
if [ "$1" ]; then |
|
|
|
if [ "$1" ]; then |
|
|
|
if $enable_check; then |
|
|
|
$@ |
|
|
|
else |
|
|
|
echo true |
|
|
|
fi |
|
|
|
else |
|
|
|
if $enable_check; then |
|
|
|
return 0 |
|
|
|
fi |
|
|
|
return 1 |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
@ -163,17 +166,19 @@ mkdir -p "$dir_install" |
|
|
|
cd "$dir_build" |
|
|
|
. "$satellite" |
|
|
|
|
|
|
|
movefiles() { |
|
|
|
mkdir -p "$2" |
|
|
|
mv $(find "$1" -maxdepth 1 -mindepth 1) "$2" |
|
|
|
rm -rf "$1" |
|
|
|
} |
|
|
|
|
|
|
|
if $enable_movedirs; then |
|
|
|
if [ "$(uname -m)" == "x86_64" ]; then |
|
|
|
if [ -d "$dir_install/lib64" ]; then |
|
|
|
mkdir -p "$dir_install/lib" |
|
|
|
mv $(find "$dir_install/lib64/" -maxdepth 1 -mindepth 1) "$dir_install/lib" |
|
|
|
rmdir "$dir_install/lib64" |
|
|
|
movefiles "$dir_install/lib64" "$dir_install/lib" |
|
|
|
fi |
|
|
|
if [ -d "$dir_install/usr/lib64" ]; then |
|
|
|
mkdir -p "$dir_install/usr/lib" |
|
|
|
mv $(find "$dir_install/usr/lib64/" -maxdepth 1 -mindepth 1) "$dir_install/usr/lib" |
|
|
|
rmdir "$dir_install/usr/lib64" |
|
|
|
movefiles "$dir_install/usr/lib64" "$dir_install/lib" |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|