38 lines
1.3 KiB
Bash
38 lines
1.3 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
bold="\033[1m"
|
|
italic="\033[3m"
|
|
reset="\033[0m"
|
|
|
|
command -v thumbsup >/dev/null 2>&1 || { echo -e "This script require ${bold}thumbsup${reset} but it's not installed.\nRun ${italic}npm install -g thumbsup${reset}\nAborting..." >&2; exit 1; }
|
|
|
|
thumbsup_folder="/var/www/vhosts/sur-le-sentier.fr/thumbsup"
|
|
config_file="config-npm.json"
|
|
|
|
echo -e "\n|--------------------------------------------|"
|
|
echo -e "| |"
|
|
echo -e "| ${bold}Thumbsup${reset} |"
|
|
echo -e "| - https://thumbsup.github.io/ |"
|
|
echo -e "| - https://github.com/thumbsup/thumbsup |"
|
|
echo -e "| |"
|
|
echo -e "|--------------------------------------------|\n"
|
|
|
|
echo -e "\n${bold}Thumbsup config and theme folder:${reset} $thumbsup_folder\n"
|
|
|
|
cd $thumbsup_folder
|
|
|
|
echo -e "\n${bold}Configuration file:${reset} $thumbsup_folder/$config_file\n"
|
|
cat "$config_file"
|
|
|
|
echo -e "\n${bold}Theme options file:${reset}\n"
|
|
cat "theme_options.json"
|
|
|
|
echo -e "\n\n${bold}Generating gallery...${reset}\n"
|
|
|
|
thumbsup --config="$config_file"
|
|
|
|
echo -e "\n${bold}Gallery files:${reset} /var/www/vhosts/sur-le-sentier.fr/httpdocs/gallery"
|
|
|
|
echo -e "\n${bold}Visit Gallery:${reset} https://sur-le-sentier.fr/gallery"
|
|
echo ""
|