Skip to content

Latest commit

 

History

History
17 lines (16 loc) · 591 Bytes

HOW_TO_INSTALL.md

File metadata and controls

17 lines (16 loc) · 591 Bytes

How to install

if [ -d /opt/secretctl ]; then
    git -C /opt/secretctl pull --quiet origin main &> /dev/null
else
    git clone git@github.com:aleroxac/secretctl.git /tmp/secretctl
    sudo mv /tmp/secretctl /opt/
    chown -R ${USERNAME}:${USERNAME} /opt/secretctl

    CURRENT_SHELL=$(echo "${SHELL}" | cut -d '/' -f3)
    if [[ ! "${CURRENT_SHELL}" =~ bash|zsh ]]; then
        echo "Sorry, this shell is not supported by secretctl."
        exit 1
    fi
    echo -e "## ----- secretctl\nexport PATH=${PATH}:/opt/secretctl/shell/secretctl" >> "~/.${CURRENT_SHELL}rc"
fi