Files
projectr/bin/site_list
T
2020-05-30 16:00:49 +02:00

19 lines
626 B
Bash
Executable File

#!/usr/bin/env bash
########################################################################
# Copyright 2014 Lukas Bestle <project-projectr@lukasbestle.com>
# License MIT
########################################################################
# Lists all known sites.
#
# Usage: project_list
########################################################################
# Check if the sites directory exists
if [[ ! -d "$HOME/web/sites" ]]; then
echo -e "\033[31mThere is no \033[34m~/web/sites\033[31m directory yet.\033[0m" >&2
exit 1
fi
ls "$HOME/web/sites" | cat # Make sure every item is printed on a new line
exit $?