#!/bin/sh if [[ ! -f "$1" ]]; then echo "File $1 does not exist." fi mkdir -p ~/.local/bin script=$(basename "$1") echo "update script $script" cp "$1" ~/.local/bin/$script