#!/bin/bash # https://grabski.me/posts/2020/09/automatically-unlock-keepassxc-on-startup-and-after-lock-screen/ function keepassxc_install { local target local dir="$(dirname $(realpath "${BASH_SOURCE:-$0}"))" for script in $dir/*.sh; do name=$(basename ${script%.sh}) target="${1:-/opt/bin}/$name" chmod +rx $script ln -sf $script $target echo link to $script created at $target echo script $name in path at $(which $name) done ls -la /opt/bin | grep keepass } # if script was executed then call the function (return 0 2>/dev/null) || keepassxc_install $@