Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=commitdiff;h=b6029f8b3314af31f39fcf078c0a24ff775b458d
commit b6029f8b3314af31f39fcf078c0a24ff775b458d Author: crazy <cr...@frugalware.org> Date: Sat Sep 23 02:22:13 2017 +0200 added Fdirchmod() * Fdirschmod is fine however when we just want to * change mode of a single dir it just sucks hell since is using find * with type d on whole subdirs .. * found that bc cups got a typo on line 84 .. diff --git a/source/include/util.sh b/source/include/util.sh index 74bcef0..eb44d7d 100644 --- a/source/include/util.sh +++ b/source/include/util.sh @@ -480,6 +480,21 @@ Fdirschmod() { } ### +# * Fdirchmod(): Changes the permissions of dir $Fdestdir. +# First parameter: octal mode or [+-][rwxstugo] , second parameter: the dir_name +### +Fdirchmod() { + + if [ -e "$Fdestdir/$2" ]; then + Fmessage "Changing permissions on directory: $2 to $1" + chmod $1 $Fdestdir/$2 || Fdie + else + Fmessage "Directory $2 doesn't exist.." + Fdie + fi +} + +### # * Ffileschmod(): Changes the permissions of all file(s) inside $Fdestdir. First # parameter: where to start "find", second parameter: octal mode or # [+-][rwxstugo]. _______________________________________________ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git