📦➔🦋 Store and retrieve files on the Atmosphere
35
fork

Configure Feed

Select the types of activity you want to include in your feed.

add configurable hooks

Ducky 7cae1358 f868f24d

+30
+6
src/commands/help.sh
··· 162 162 Disable periodic update checking when command finishes 163 163 ${_envvar_prefix}_DISABLE_UPDATE_COMMAND <bool¹> (default: $_disable_update_command_default) 164 164 Disable \`update\` command\n 165 + ${_envvar_prefix}_HOOK_PRE_START_PATH <path> 166 + ... 167 + ${_envvar_prefix}_HOOK_POST_START_PATH <path> 168 + ... 169 + ${_envvar_prefix}_HOOK_PRE_EXIT_PATH <path> 170 + ...\n 165 171 ${_envvar_prefix}_DEBUG <bool¹> (default: 0) 166 172 Print debug outputs 167 173 ⚠️ When output is JSON (${_envvar_prefix}_OUTPUT_JSON=1), sets to 0\n
+3
src/commands/something_broke.sh
··· 100 100 $(atfile.something_broke.print_envvar "FORCE_NOW") 101 101 $(atfile.something_broke.print_envvar "FORCE_OS") 102 102 $(atfile.something_broke.print_envvar "FORCE_VERSION") 103 + $(atfile.something_broke.print_envvar "HOOK_POST_START_PATH") 104 + $(atfile.something_broke.print_envvar "HOOK_PRE_EXIT_PATH") 105 + $(atfile.something_broke.print_envvar "HOOK_PRE_START_PATH") 103 106 $(atfile.something_broke.print_envvar "MAX_LIST" "$_max_list_default") 104 107 $(atfile.something_broke.print_envvar "OUTPUT_JSON" "$_output_json_default") 105 108 $(atfile.something_broke.print_envvar "PATH_CONF" "$_path_envvar")
+11
src/entry.sh
··· 17 17 _command_args=("${@:2}") 18 18 _os="$(atfile.util.get_os)" 19 19 _os_supported=0 20 + _hook_post_start_path="$(atfile.util.get_envvar "${_envvar_prefix}_HOOK_POST_START_PATH")" 21 + _hook_pre_exit_path="$(atfile.util.get_envvar "${_envvar_prefix}_HOOK_PRE_EXIT_PATH")" 22 + _hook_pre_start_path="$(atfile.util.get_envvar "${_envvar_prefix}_HOOK_PRE_START_PATH")" 20 23 _is_piped=0 21 24 _is_sourced=0 22 25 _meta_author="{:meta_author:}" ··· 29 32 ## "Hello, world!" 30 33 31 34 atfile.say.debug "Reticulating splines..." 35 + atfile.util.source_hook "$_hook_pre_start_path" 32 36 33 37 ## Paths 34 38 ··· 108 112 109 113 if [[ $_is_piped == 1 ]] ||\ 110 114 [[ "$1" == "install" ]]; then 115 + atfile.util.source_hook "$_hook_post_start_path" 116 + 111 117 if [[ "$1" == "install" ]]; then 112 118 atfile.install "$2" "$3" "$4" 113 119 install_exit="$?" ··· 116 122 install_exit="$?" 117 123 fi 118 124 125 + atfile.util.source_hook "$_hook_pre_exit_path" 119 126 atfile.util.print_seconds_since_start_debug 127 + 120 128 exit $install_exit 121 129 fi 122 130 ··· 328 336 329 337 ## Invoke 330 338 339 + atfile.util.source_hook "$_hook_post_start_path" 340 + 331 341 if [[ $_is_sourced == 0 ]]; then 332 342 atfile.auth 333 343 atfile.invoke "$_command" "${_command_args[@]}" 334 344 fi 335 345 346 + atfile.util.source_hook "$_hook_pre_exit_path" 336 347 atfile.util.print_seconds_since_start_debug
+10
src/shared/util.sh
··· 1124 1124 fi 1125 1125 } 1126 1126 1127 + function atfile.util.source_hook() { 1128 + file="$1" 1129 + 1130 + if [[ -f "$file" ]]; then 1131 + atfile.say.debug "Sourcing: $file" 1132 + # shellcheck disable=SC1090 1133 + . "$file" 1134 + fi 1135 + } 1136 + 1127 1137 function atfile.util.write_cache() { 1128 1138 file="$1" 1129 1139 file_path="$_path_cache/$1"