This is the general pattern I settled on for wrapper binaries (after giving up on Makefiles because I'm just odd that way):
#!/bin/sh
test -e $SNAP_USER_DATA/foo.conf || cp $SNAP/etc/foo.conf $SNAP_USER_DATA/ exec $SNAP/bin/foo
This is the general pattern I settled on for wrapper binaries (after giving up on Makefiles because I'm just odd that way):
#!/bin/sh
test -e $SNAP_USER_ DATA/foo. conf || cp $SNAP/etc/foo.conf $SNAP_USER_DATA/
exec $SNAP/bin/foo