chref
chref
is an utility that allows you to combine the commands chmod --reference
and chown --reference
into one command.
This is early development version. I am currently considering:
Roadmap:
- On a Linux system, changing symbolic link, by default changes only the target of the symbolic link. I'd like to change ownership of symbolic link itself
- man pages
- DEB package
- RPM package
- MacOS PKG
- ARM porting
Building from source
If you want to build chref
from source, please verify to have already installed go1.19.x or higher.
Then run this command:
go build -v -ldflags="-X 'chref/build.Version=$(cat VERSION)' -X 'chref/build.BuildUser=$(id -u -n)' -X 'chref/build.BuildTime=$(date)'"
If you want to build automatically chref
for all the supported platform consider to use binary-builder.sh
provided in scripts folder.
Clone this repository firs, then follow these steps
cd chref
chmod +x scripts/binary-builder.sh
./scripts/binary-builder.sh
Manual Installation
Remove any previous chref
installation by deleting the /usr/local/chref folder (if it exists), then extract the archive you just downloaded into /usr/local, creating a fresh chref
tree in /usr/local/chref
sudo tar -C /usr/local -zxf chref.tar.gz
You can do this by adding the following line to your $HOME/.profile (or $HOME/.bashrc) or /etc/profile (for a system-wide installation)
export PATH=$PATH:/usr/local/chref/bin
Note: Changes made to a profile file may not apply until the next time you log into your computer. To apply the changes immediately, run the following command (may differ if you are using .profile instead of .bashrc):
source $HOME/.bashrc
If you want to tip me:
DAqFTEzxSxaNZ1HpVJsEV5XL2a73g3ucio