How to check XDG_CACHE_HOME
See original GitHub issueHi,
I want to write a cache file to speed up later runs of the appimage. For this I want to check XDG_CACHE_HOME and have a fallback variable for when it is not set.
In bash the check would look like this:
echo ${XDG_CACHE_HOME:-$HOME/.cache}
Documentation for this is here: https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html
Setting that in the recipe results in wrong path descriptions.
runtime:
path_mappings:
- /dev/:$APPDIR/dev
env:
GST_PLUGIN_SYSTEM_PATH_1_0: '${APPDIR}/usr/lib/@CMAKE_SYSTEM_PROCESSOR@-linux-gnu/gstreamer-1.0'
GST_REGISTRY: "${XDG_CACHE_HOME:-$HOME/.cache}/application/gstreamer-cache.bin"
That writes to /home/user/-/home/user/.cache/application/
. Is there a way to have such a check or is it simply impossible?
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
XDG Base Directory - ArchWiki
Application Legacy Path Supported Since
ALSA ~/.asoundrc 577df36 · 1.2.3
Android Studio ~/.AndroidStudioX.X Android Studio 4.1
Anki ~/Anki , ~/Documents/Anki
Read more >XDG Base Directory Specification
$XDG_STATE_HOME defines the base directory relative to which user-specific state files should be stored. If $XDG_STATE_HOME is either not set or ...
Read more >Declutter Your Home Directory With The XDG Base ... - YouTube
I noticed that my home directory was becoming an absolute mess recently I had so many files in it that shouldn't have been...
Read more >xdg/README.md at master · adrg/xdg - GitHub
Go implementation of the XDG Base Directory Specification and XDG user directories ... XDG_CACHE_HOME, ~/.cache, ~/Library/Caches, $home/lib/cache.
Read more >XDGBaseDirectorySpecification - Debian Wiki
The XDG Base Directory Specification (XDGBDS) defines four categories of so called DotFiles and the corresponding directories in a users ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is now documented at https://appimage-builder.readthedocs.io/en/latest/advanced/helpers.html
Closing the issue, please feel free to reopen if needed.
Sorry for that, right now the only documentation is the code. It would be great if someone could assist me on documenting them. These are the helpers available: https://github.com/AppImageCrafters/appimage-builder/tree/master/appimagebuilder/modules/setup/helpers