You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I am building a tree of "unpack this to get this, rename this to get this" I should instead of using a complex set of loops and ifs and praying that the names align, recursively descend it to create a series of actions, ie:
decompress
unarchive
rename
It will reduce complexity and be more readable plus filename alignment issues will be greatly reduced especially con converging and expanding packages (or where the same manual page is stored in multiple files:)
[[- range $pname, $prog := .Programs ]]
[[- range $keyword, $binary := $prog.Binary ]]
[[- if ne $prog.InstalledFilename (index $binary 1) ]]
[[- if gt (len $binary) 2 ]]
echo ' if use [[ $keyword ]]; then'
echo " mv \"${{ env.[[ join (filterEmpty $pname "appimage_archived_name" $keyword) "_" ]] }}\" \"${{ env.[[ join (filterEmpty $pname "appimage_installed_name" ) "_" ]] }}\" || die \"Can't move archived file\""
echo ' fi'
[[- else ]]
echo ' if use [[ $keyword ]]; then'
echo " cp \"\${DISTDIR}/\${P}-${{ env.[[ join (filterEmpty $pname "release_name" $keyword) "_" ]] }}\" \"${{ env.[[ join (filterEmpty $pname "appimage_installed_name" ) "_" ]] }}\" || die \"Can't copy downloaded file\""
echo ' fi'
[[- end ]]
[[- end ]]
The text was updated successfully, but these errors were encountered:
It would definitely reduce complexity. I will probably do it when I have more energy & focus when there are more users. I need to work on other things right now.
Since I am building a tree of "unpack this to get this, rename this to get this" I should instead of using a complex set of loops and ifs and praying that the names align, recursively descend it to create a series of actions, ie:
It will reduce complexity and be more readable plus filename alignment issues will be greatly reduced especially con converging and expanding packages (or where the same manual page is stored in multiple files:)
The text was updated successfully, but these errors were encountered: