#!/bin/sh # You should probably have DSCIP_DISREGARD_COMMIT_CHECK set to true until you # # get all the correct files in the chroot jail. # set -u # Defaults should allow anything to build, but is a bit excessive. Change to # # needs. # export CHROOT_FILES="/lib /lib64 /usr/include /usr/lib64 /usr/lib /usr/local/lib /usr/bin /bin " rm -rf "$WORKING_DIRECTORY"/jail mkdir -p "$WORKING_DIRECTORY"/jail printf "%s" "$CHROOT_FILES" | while IFS='' read -r directory do echo "Copying $directory into jail..." if [ ! -L "$directory" ]; then mkdir -p "$WORKING_DIRECTORY"/jail/"$directory" fi if [ -L "$directory" ]; then cp -r "$directory" "$WORKING_DIRECTORY"/jail/"$directory" elif [ -d "$directory" ]; then cp -r "$directory"/* "$WORKING_DIRECTORY"/jail/"$directory" fi done