Browse Source

Fixing quotes

master
mid-kid 9 years ago
parent
commit
502f0b7aa3
  1. 24
      astronaut/astronaut

24
astronaut/astronaut

@ -3,35 +3,35 @@
# Configuration # Configuration
# Build/install-time directories # Build/install-time directories
dir_build="/tmp/astronaut/build" # Temporary directory to build packages dir_build='/tmp/astronaut/build' # Temporary directory to build packages
dir_source="/tmp/astronaut/source" # Directory where the package sources will be placed dir_source='/tmp/astronaut/source' # Directory where the package sources will be placed
dir_install="/tmp/astronaut/install" # Directory where the package will be installed dir_install='/tmp/astronaut/install' # Directory where the package will be installed
# The source directory will have subdirs for each different $name, # The source directory will have subdirs for each different $name,
# specified inside the satellite file. # specified inside the satellite file.
# The $dir_install variable will have '{pkg}' replaced with $_satname, # The $dir_install variable will have '{pkg}' replaced with $_satname,
# which is the filename of the satellite, without the .sat suffix. # which is the filename of the satellite, without the .sat suffix.
# Runtime directories # Runtime directories
dir_sysroot="/" # The root directory of the system dir_sysroot='/' # The root directory of the system
dir_prefix="/usr" # Prefix directory (for /bin, /lib, /share and such) dir_prefix='/usr' # Prefix directory (for /bin, /lib, /share and such)
# Default commands # Default commands
cmd_download="curl -# -L -o {dst} {src}" # Command to execute to download files cmd_download='curl -# -L -o {dst} {src}' # Command to execute to download files
cmd_extract="tar -x -C {dst} -f {src}" # Command to execute to extract files cmd_extract='tar -x -C {dst} -f {src}' # Command to execute to extract files
# If we can't find the satellite file, we'll look in this directory for it. # If we can't find the satellite file, we'll look in this directory for it.
unset dir_satellites unset dir_satellites
# Options are comma-separated and parsed from front to back. # Options are comma-separated and parsed from front to back.
# This means that in "!opt,someotheropt,opt", opt is disabled. # This means that in '!opt,someotheropt,opt', opt is disabled.
unset options # The least-priority global options unset options # The least-priority global options
package_options() { :; } # Per-package options function. package_options() { :; } # Per-package options function.
# Example for package_options: # Example for package_options:
# package_options() { # package_options() {
# case "$1" in # case "$1" in
# package1) echo "opt1,opt2,opt3" ;; # package1) echo 'opt1,opt2,opt3' ;;
# package2) echo "someotheropts" ;; # package2) echo 'someotheropts' ;;
# esac # esac
# } # }
@ -156,14 +156,14 @@ download() {
checksum="$(_mksum "$path")" checksum="$(_mksum "$path")"
if [ "$2" -a "$checksum" != "$2" ]; then if [ "$2" -a "$checksum" != "$2" ]; then
_msg "Checksum: $checksum" _msg "Checksum: $checksum"
_exiterr "Checksum failed" _exiterr 'Checksum failed'
fi fi
fi fi
} }
extract() { extract() {
_msg "Extracting $1" _msg "Extracting $1"
[ "$2" ] && local dest="$2" || local dest="." [ "$2" ] && local dest="$2" || local dest='.'
[ "$3" ] && local cmd="$3" || local cmd="$cmd_extract" [ "$3" ] && local cmd="$3" || local cmd="$cmd_extract"
eval $(echo "$cmd" | sed -e "s@{src}@'$dir_source/$name/$1'@g" -e "s@{dst}@'$dest'@g") eval $(echo "$cmd" | sed -e "s@{src}@'$dir_source/$name/$1'@g" -e "s@{dst}@'$dest'@g")
} }

Loading…
Cancel
Save