Skip to content

Instantly share code, notes, and snippets.

@therealromster
Created February 27, 2019 07:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save therealromster/2b0690c4ba2aaa1dc9e9cb73f24f3781 to your computer and use it in GitHub Desktop.
Save therealromster/2b0690c4ba2aaa1dc9e9cb73f24f3781 to your computer and use it in GitHub Desktop.
crux ports permisions as user pkgmk
diff -pruN ports-1.5.orig ports-1.5
--- ports-1.5.orig/ports.in 2004-03-08 07:55:24.000000000 +1100
+++ ports-1.5/ports.in 2009-01-14 16:53:29.000000000 +1100
@@ -118,6 +118,11 @@
fi
}
+fix_permissions() {
+ chown -R pkgmk:pkgmk "${PORTS_DIR}"
+ find "${PORTS_DIR}" -type d -exec chmod 0775 {} \;
+}
+
print_try_help() {
echo "Try '$COMMAND --help' for more information."
}
@@ -166,6 +171,7 @@
if [ "$OPT_MODE" = "update" ]; then
check_ports_dir
update_ports
+ fix_permissions
elif [ "$OPT_MODE" = "list" ]; then
check_ports_dir
list_ports
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment