forked from haiwan/sledge
parent
69d7a8ae8d
commit
da60ec8c8b
@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
# Currently, the build container still used root. This results in files owned by root that interfere with running things outside of the container. Pending additional tooling work, this script is a stop gap that searches and chowns all files in the proeject tree owned by root
|
||||
|
||||
if [[ $(whoami) == "root" ]]; then
|
||||
echo "Should not be run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Uses your host username and its primary associated group
|
||||
username="$(whoami)"
|
||||
group="$(id -g -n "$username")"
|
||||
|
||||
while read -r file; do
|
||||
echo sudo chown "$username":"$group" "$file"
|
||||
sudo chown "$username":"$group" "$file"
|
||||
done < <(find ~+ -type f -user root)
|
Loading…
Reference in new issue