Skip to content

Commit

Permalink
refactor - kamangir/bolt#746
Browse files Browse the repository at this point in the history
  • Loading branch information
kamangir committed May 24, 2024
1 parent 46e78c8 commit f65cd0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 36 deletions.
38 changes: 3 additions & 35 deletions .abcli/ferfereh.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#! /usr/bin/env bash

function F() {
ferfereh "$@"
}

function ferfereh() {
local task=$(abcli_unpack_keyword $1 help)

Expand All @@ -17,43 +13,15 @@ function ferfereh() {
return
fi

local function_name="ferfereh_$task"
if [[ $(type -t $function_name) == "function" ]]; then
$function_name "${@:2}"
return
fi

if [ "$task" == "cleanup" ]; then
python3 -m ferfereh cleanup \
--path $abcli_path_git/ferfereh/images/tools
return
fi

if [ "$task" == "init" ]; then
abcli_init ferfereh "${@:2}"
return
fi

if [[ "|pylint|pytest|test|" == *"|$task|"* ]]; then
abcli_${task} plugin=ferfereh,$2 \
"${@:3}"
return
fi

if [[ "|pypi|" == *"|$task|"* ]]; then
abcli_${task} "$2" \
plugin=ferfereh,$3 \
"${@:4}"
return
fi

if [ "$task" == "version" ]; then
python3 -m ferfereh version "${@:2}"
return
fi

abcli_log_error "-ferfereh: $task: command not found."
return 1
abcli_generic_task \
plugin=ferfereh,task=$task \
"${@:2}"
}

abcli_source_path \
Expand Down
2 changes: 1 addition & 1 deletion ferfereh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@

DESCRIPTION = f"{ICON} 3d-printed graffiti"

VERSION = "1.125.1"
VERSION = "1.126.1"

0 comments on commit f65cd0c

Please sign in to comment.