Setup: RPi3 running Ubuntu Core 16, ssh in from macair
I am currently debugging a simple apps bash script that uses snap environment variables. I guess to debug the script, the snap needs to be created and installed. Otherwise, the variables don’t exists.
My debug cycle is:
modify the script
snapcraft clean scripts -s pull
snapcraft OR snapcraft prime
snap remove (previous install)
sudo snap install OR sudo snap try --devmode prime
You could do this by running up-to and including the prime step and then separately run the pack prime step after modifying the script in your prime/ directory:
snapcraft
sudo snap install my-app.snap --dangerous
snap run my-app # realise it's broken
vi script.sh
cp script.sh prime/path/to/script.sh # put the script in the prime/ directory
snapcraft pack prime
sudo snap install my-app.snap --dangerous
snap run my-app # it's fixed?