All files have been prettified by making sure we use 2-space indent. agenda: Instead of the hidden .tree file, a file created "More..." is made. You can use (ex) "agenda --view "2026" to get a full list of files from that year/date/day. Additionally, minor fixes have been made. clip: You can now use "-c" to clear the clipbaord.
23 lines
576 B
Bash
Executable file
23 lines
576 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Simple program that changes ownership to the current
|
|
# user, recursively.
|
|
|
|
LD_INTERNAL=1
|
|
. $(dirname $(realpath $0))/ld.source
|
|
|
|
if [[ -z "$1" ]]; then
|
|
echo "$LD_BIN: Quickly take ownership of files/folders."
|
|
echo "Usage: $LD_BIN <folders or files>"
|
|
echo "Requires sudo. If sudo is not installed, this tool will fail."
|
|
exit 2
|
|
fi
|
|
|
|
# Ensure all arguments exist before attempting chown
|
|
for target in "$@"; do
|
|
if [[ ! -e "$target" ]]; then
|
|
echo "Error: \"$target\" does not exist."
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
sudo chown -R "$(whoami):$(whoami)" "$@"
|