# This file is part of the src2pkg program: # Copyright 2005-2008 Gilbert Ashley # src2pkg is released under the GNU General Public License Version 2 ### fix_pkg_perms fix_pkg_perms() { if [[ "$FAILED" = "" ]] ; then if [[ "$CORRECT_PKG_PERMS" != "NO" ]] ; then echo -n $BLUE"Correcting package permissions - "$NORMAL # unused fake_root_perms() { start_fakeroot chown -R root:root $PKG_DIR kill_fakeroot } if [ "$EUID" = "0" ] ; then chown -R root:root $PKG_DIR else #fake_root_perms chown -R $OWNER:$GROUP $PKG_DIR fi cd $PKG_DIR ; find . -type d -exec chmod 755 {} \; [[ -d $PKG_DIR/tmp ]] && chmod 1755 $PKG_DIR/tmp [[ -d $PKG_DIR/var/tmp ]] && chmod 1755 $PKG_DIR/var/tmp for dir in $BIN_DIRS ; do [[ -d $PKG_DIR/$dir ]] && chmod -R 755 $PKG_DIR/$dir done find . | xargs -r file | grep "executable" | grep ELF | cut -f 1 -d : | xargs -r chmod 755 2> /dev/null echo $GREEN"Done"$NORMAL fi fi }