docker exec --user=root -it $name bash
}
+generate_shell_code() {
+ local shell="$1"
+
+ case "$shell" in
+ bash|ksh|zsh)
+ echo "alias cleanbuild=$dir/cleanbuild"
+ ;;
+ *)
+ die "Unsupported shell: $shell"
+ ;;
+ esac
+}
+
package_prepare() {
notice "Fetch sources and install dependencies"
if [ -d $topdir/packages/$PACKAGE_NAME ]; then
parse_options() {
local t
- t=$(getopt -o 'x' --long 'network,exec,no-tmpfs,notmpfs,tmpfs:,keep-container:,with:,without:' -n "$PROGRAM" -- "$@")
+ t=$(getopt -o 'x' --long 'network,exec,no-tmpfs,notmpfs,tmpfs:,shellcode:,keep-container:,with:,without:' -n "$PROGRAM" -- "$@")
[ $? != 0 ] && exit $?
eval set -- "$t"
--no-tmpfs|--notmpfs)
TMPFS=false
;;
+ --shellcode)
+ shift
+ generate_shell_code "$1"
+ exit 0
+ ;;
--tmpfs)
shift
TMPFS="$1"