Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Commit

Permalink
snap/hooks/install: create profiles dir before copy
Browse files Browse the repository at this point in the history
Previously the snap was uninstallable because the directory didn't
exist.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
  • Loading branch information
anonymouse64 committed Jul 6, 2019
1 parent 4d03f64 commit fbdb622
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion snap/hooks/install
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ if [ ! -f "$SNAP_DATA/config/edgex-device-grove/res/configuration.toml" ]; then
"$SNAP_DATA/config/edgex-device-grove/res/configuration.toml"
fi

cp "$SNAP/config/edgex-device-grove/res/profiles/Grove_Device.yaml" "$SNAP_DATA/config/edgex-device-grove/res/profiles/Grove_Device.yaml"
mkdir -p $SNAP_DATA/config/edgex-device-grove/res/profiles
if [ ! -f "$SNAP_DATA/config/edgex-device-grove/res/profiles/Grove_Device.yaml" ]; then
cp "$SNAP/config/edgex-device-grove/res/profiles/Grove_Device.yaml" "$SNAP_DATA/config/edgex-device-grove/res/profiles/Grove_Device.yaml"
fi

0 comments on commit fbdb622

Please sign in to comment.