#!/usr/bin/env bash set -eo pipefail if [[ "$1" == "-h" || "$1" == "--help" ]]; then cat < Change ownership of files to current user. Options: -h, --help Show this help message Arguments: files Files or directories to change ownership EOF exit 0 fi sudo chown "$(whoami)". -R --changes --preserve-root "$@"