install(){ which npm >/dev/null 2>&1 && { npm install -g /usr/share/lfp/ocr --unsafe-perm=true --allow-root || npm install /usr/share/lfp/ocr --user } } post_install() { install echo -e "\n \033[1;33m[+]\e[0;1;32m For on-exit directory changing, add the following line to your bash/zshrc\e[0m :\e[36m\n\n source '/usr/share/lfp/lfpcd'\n\e[0m" # echo -e "\n \033[1;33m[+]\e[0;1;32m For LFP NodeManager/PyManager features to properly function, please add the following line to your bash/zshrc\e[0m :\e[36m\n\n source '/usr/share/lfp/lfp-functions'\n\e[0m" # echo -e "\n \033[1;33m[+]\e[0;1;32m =>\e[0m :\e[36m\n\n source \\ \n '/usr/share/lfp/lfp-functions' \\ \n '/usr/share/lfp/lfpcd'\n\e[0m" } post_upgrade() { install echo -e "\n \033[1;33m[+]\e[0;1;32m For on-exit directory changing, add the following line to your bash/zshrc\e[0m :\e[36m\n\n source '/usr/share/lfp/lfpcd'\n\e[0m" }