Skip to content

Commit

Permalink
feat(change_color.sh): add --destdir option
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Oct 26, 2022
1 parent 775b8c2 commit b90779d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions change_color.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ root="$(readlink -f "$(dirname "$0")")"
print_usage() {
echo "
usage:
$0 [-o OUTPUT_THEME_NAME] [-c COLOR] PRESET_NAME_OR_PATH
$0 [-o OUTPUT_THEME_NAME] [-c COLOR] [-d DEST_DIR] PRESET_NAME_OR_PATH
examples:
$0 -o droid_test_3 -c 5e468c
Expand All @@ -31,6 +31,10 @@ do
ICONS_ARCHDROID="${2}"
shift
;;
-d|--destdir)
output_dir="$2"
shift
;;
*)
if [[ "${1}" == -* ]] || [[ ${THEME-} ]]; then
echo "unknown option ${1}"
Expand Down Expand Up @@ -64,7 +68,7 @@ icons_color="${ICONS_ARCHDROID-$SEL_BG}"


OUTPUT_THEME_NAME="${OUTPUT_THEME_NAME-oomox-$THEME-flat}"
output_dir="${HOME}/.icons/${OUTPUT_THEME_NAME}"
output_dir="${output_dir:-$HOME/.icons/$OUTPUT_THEME_NAME}"

if [[ -d "${output_dir}" ]] ; then
rm -r "${output_dir}"
Expand Down

0 comments on commit b90779d

Please sign in to comment.