๐Ÿ“ฆโž”๐Ÿฆ‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

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

upload: add skip envvar hint to optional progs if not installed

Ducky 95af2aa6 9eb06cc0

+7 -2
+7 -2
atfile.sh
··· 84 84 function atfile.util.check_prog() { 85 85 command="$1" 86 86 download_hint="$2" 87 + skip_hint="$3" 87 88 88 89 if ! [ -x "$(command -v $command)" ]; then 89 90 message="'$command' not installed" 90 91 91 92 if [[ -n "$download_hint" ]]; then 92 93 message="$message (download: $download_hint)" 94 + fi 95 + 96 + if [[ -n "$skip_hint" ]]; then 97 + message="$message\nโ†ณ This is optional; set ${skip_hint}=1 to ignore" 93 98 fi 94 99 95 100 atfile.die "$message" ··· 101 106 } 102 107 103 108 function atfile.util.check_prog_optional_metadata() { 104 - [[ $_skip_ni_exiftool == 0 ]] && atfile.util.check_prog "exiftool" "https://exiftool.org/" 105 - [[ $_skip_ni_mediainfo == 0 ]] && atfile.util.check_prog "mediainfo" "https://mediaarea.net/en/MediaInfo" 109 + [[ $_skip_ni_exiftool == 0 ]] && atfile.util.check_prog "exiftool" "https://exiftool.org/" "${_envvar_prefix}_SKIP_NI_EXIFTOOL" 110 + [[ $_skip_ni_mediainfo == 0 ]] && atfile.util.check_prog "mediainfo" "https://mediaarea.net/en/MediaInfo" "${_envvar_prefix}_SKIP_NI_MEDIAINFO" 106 111 } 107 112 108 113 function atfile.util.get_cache() {