šŸ“¦āž”šŸ¦‹ Store and retrieve files on the Atmosphere
35
fork

Configure Feed

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

various

Ducky e845b750 94e9b899

+38 -19
+35 -19
src/commands/build.sh
··· 30 30 sed -s "s|{:$key:}|$value|g" <<< "$string" 31 31 } 32 32 33 + function atfile.build.pad_emoji() { 34 + emoji="$1" 35 + padding="$2" 36 + 37 + # shellcheck disable=SC2154 38 + if [[ $_ci == "tangled" ]]; then 39 + atfile.say.inline "$emoji" 40 + else 41 + atfile.say.inline "$emoji$padding" 42 + fi 43 + } 44 + 33 45 atfile.util.check_prog "git" 34 46 atfile.util.check_prog "grep" 35 47 atfile.util.check_prog "hostname" ··· 56 68 test_warning_count=0 57 69 test_ignore_count=0 58 70 59 - atfile.say "āš’ļø Building..." 71 + atfile.say "$(atfile.build.pad_emoji "āš’ļø" " ") Building..." 60 72 61 73 echo "↳ Creating '$dist_file'..." 62 74 mkdir -p "$dist_dir" ··· 133 145 message="$(echo "$item" | jq -r '.message')" 134 146 135 147 case "$level" in 136 - "error") level="šŸ›‘ Error"; (( test_error_count++ )) ;; 137 - "info") level="ā„¹ļø Info"; (( test_info_count++ )) ;; 138 - "style") level="šŸŽØ Style"; (( test_style_count++ )) ;; 139 - "warning") level="āš ļø Warning"; (( test_warning_count++ )) ;; 148 + "error") level="$(atfile.build.pad_emoji "šŸ›‘" "") Error"; (( test_error_count++ )) ;; 149 + "info") level="$(atfile.build.pad_emoji "ā„¹ļø" " ") Info"; (( test_info_count++ )) ;; 150 + "style") level="$(atfile.build.pad_emoji "šŸŽØ" "") Style"; (( test_style_count++ )) ;; 151 + "warning") level="$(atfile.build.pad_emoji "āš ļø" " ") Warning"; (( test_warning_count++ )) ;; 140 152 esac 141 153 142 154 echo "↳ $level ($line:$col): [SC$code] $message" ··· 144 156 145 157 test_total_count=$(( test_error_count + test_info_count + test_style_count + test_warning_count )) 146 158 159 + end_message_suffix_string="↳ Issues: $(atfile.util.fmt_int "$test_total_count") 160 + ↳ Error: $(atfile.util.fmt_int "$test_error_count") 161 + ↳ Warning: $(atfile.util.fmt_int "$test_warning_count") 162 + ↳ Info: $(atfile.util.fmt_int "$test_info_count") 163 + ↳ Style: $(atfile.util.fmt_int "$test_style_count") 164 + ↳ Ignored: $(atfile.util.fmt_int "$test_ignore_count") 165 + ↳ ID: $id" 166 + 167 + atfile.say "---" 168 + 147 169 if [[ $test_error_count -gt 0 ]]; then 148 - atfile.say "---" 149 - atfile.say "ā›” Build failed" "" 31 31 1 170 + atfile.say "$(atfile.build.pad_emoji "ā›”" "") Failed: $_version 171 + $end_message_suffix_string" "" 31 31 1 150 172 rm -f "$dist_path" 151 173 exit 255 152 - fi 153 - 154 - echo -e "---\nāœ… Built: $_version 174 + else 175 + echo -e "$(atfile.build.pad_emoji "āœ…" "") Built: $_version 155 176 ↳ Path: ./$dist_path_relative 156 177 ↳ Check: $checksum 157 178 ↳ Size: $(atfile.util.get_file_size_pretty "$(stat -c %s "$dist_path")") 158 179 ↳ Lines: $(atfile.util.fmt_int "$(wc -l < "$dist_path")") 159 - ↳ Issues: $(atfile.util.fmt_int "$test_total_count") 160 - ↳ Error: $(atfile.util.fmt_int "$test_error_count") 161 - ↳ Warning: $(atfile.util.fmt_int "$test_warning_count") 162 - ↳ Info: $(atfile.util.fmt_int "$test_info_count") 163 - ↳ Style: $(atfile.util.fmt_int "$test_style_count") 164 - ↳ Ignored: $(atfile.util.fmt_int "$test_ignore_count") 165 - ↳ ID: $id" 180 + $end_message_suffix_string" 181 + fi 166 182 167 183 chmod +x "$dist_path" 168 184 169 185 # shellcheck disable=SC2154 170 186 if [[ $_devel_enable_publish == 1 ]]; then 171 - atfile.say "---\n✨ Updating..." 187 + atfile.say "---\n$(atfile.build.pad_emoji "✨" "") Updating..." 172 188 atfile.auth "$_devel_dist_username" "$_devel_dist_password" 173 189 [[ $_version == *"+"* ]] && atfile.die "Cannot publish a Git version ($_version)" 174 190 ··· 185 201 \"checksum\": \"$checksum\" 186 202 }" 187 203 188 - atfile.say "---\nā¬†ļø Bumping..." 204 + atfile.say "---\n$(atfile.build.pad_emoji "ā¬†ļø" " ") Bumping..." 189 205 # shellcheck disable=SC2154 190 206 atfile.record update "at://$_devel_dist_username/self.atfile.latest/self" "$latest_release_record" 191 207 fi
+2
src/commands/install.sh
··· 29 29 # NOTE: The correct path of '$PREFIX/local/bin' would be more correct, 30 30 # however, '$PREFIX/local' doesn't exist by default on Termux (and thus, 31 31 # not in $PATH), so we'll install it in '$PREFIX/bin' instead 32 + # shellcheck disable=SC2153 32 33 install_dir="$PREFIX/bin" 33 34 ;; 34 35 "haiku") ··· 116 117 atfile.say.debug "Creating config file..." 117 118 118 119 echo -e "ATFILE_USERNAME=<your-username>\nATFILE_PASSWORD=<your-password>" > "$conf_dir/$_file_envvar" 120 + # shellcheck disable=SC2320 119 121 [[ $? != 0 ]] && die "Unable to create config file ($conf_dir/$_file_envvar)" 120 122 fi 121 123
+1
src/shared/util.sh
··· 12 12 key="$1" 13 13 name="$2" 14 14 15 + # shellcheck disable=SC2154 15 16 echo "$_fmt_out_file" | sed -e "s|\[name\]|$name|g" -e "s|\[key\]|$key|g" 16 17 } 17 18