diff --git a/qsgen2 b/qsgen2 index 8e949e0..4f9d4f4 100755 --- a/qsgen2 +++ b/qsgen2 @@ -85,35 +85,6 @@ _list_sites() { fi } -_cd_to_site() { - local site_number="${1}" - local sites_file="${HOME}/.config/qsgen2/sites.qsc" - - # Check if sites file exists - if [[ ! -f "${sites_file}" ]]; then - echo "Sites file not found." - return 1 # Exit the function with an error status. - fi - - # Get the directory for the site number - local project_dir=$(awk -F'|' -v num="${site_number}" '$1 == num {print $3}' "${sites_file}") - - # Check if the directory was found - if [[ -z "${project_dir}" ]]; then - echo "Site with number ${site_number} not found." - return 1 # Exit the function with an error status. - fi - - # Check if the directory exists - if [[ ! -d "${project_dir}" ]]; then - echo "The directory for site number ${site_number} does not exist." - return 1 # Exit the function with an error status. - fi - - # Print the cd command - echo "cd ${project_dir}" -} - function _version() { echo "${yellow}- Created by kekePower - 2018-$(date +%Y)${end}" @@ -200,10 +171,6 @@ case "$1" in _list_sites exit ;; - cd) - _cd_to_site_output() { eval $(_cd_to_site "$1"); }; _cd_to_site_output $2 - exit - ;; force) _msg sub "- Forced Update: Generating Everything" : >| "$blog_cache_file" # Truncate the blog cache before doing update