Merge lp:~mardy/unity8-session-snap/oa-hook into lp:unity8-session-snap

Proposed by Alberto Mardegan
Status: Work in progress
Proposed branch: lp:~mardy/unity8-session-snap/oa-hook
Merge into: lp:unity8-session-snap
Diff against target: 36 lines (+31/-0)
1 file modified
snap/hooks/connect-slot-online-accounts (+31/-0)
To merge this branch: bzr merge lp:~mardy/unity8-session-snap/oa-hook
Reviewer Review Type Date Requested Status
Unity8 Session Snap team Pending
Review via email: mp+317840@code.launchpad.net

Commit message

Add interface hook for Online Accounts

This invokes the old click hook.

Description of the change

Add interface hook for Online Accounts

This invokes the old click hook.

You are welcome to have a look at this MP, but let's not land it before the Online Accounts interface has been merged into snapd:
https://github.com/snapcore/snapd/pull/2869

To post a comment you must log in.

Unmerged revisions

120. By Alberto Mardegan

Add hook for Online Accounts interface

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'snap/hooks'
2=== added file 'snap/hooks/connect-slot-online-accounts'
3--- snap/hooks/connect-slot-online-accounts 1970-01-01 00:00:00 +0000
4+++ snap/hooks/connect-slot-online-accounts 2017-02-21 12:11:32 +0000
5@@ -0,0 +1,31 @@
6+#!/bin/sh
7+
8+if [ "$SNAP_ARCH" = "amd64" ]; then
9+ ARCH="x86_64-linux-gnu"
10+elif [ "$SNAP_ARCH" = "armhf" ]; then
11+ ARCH="arm-linux-gnueabihf"
12+elif [ "$SNAP_ARCH" = "arm64" ]; then
13+ ARCH="aarch64-linux-gnu"
14+else
15+ ARCH="$SNAP_ARCH-linux-gnu"
16+fi
17+
18+MANIFEST_DIR="$SNAP_COMMON/xdg-data/online-accounts-hooks2"
19+mkdir -p "$MANIFEST_DIR"
20+
21+# FIXME: get the name directly from snapd:
22+# https://bugs.launchpad.net/bugs/1664155
23+PEER_NAME="$(snapctl get --plug :online-accounts name)"
24+
25+snapctl get --plug :online-accounts manifest > "$MANIFEST_DIR/$PEER_NAME.accounts"
26+
27+export XDG_DATA_HOME=$SNAP_COMMON/xdg-data
28+export XDG_DATA_DIRS=$SNAP_DATA/xdg-data:$SNAP_COMMON/xdg-data:$SNAP/:$XDG_DATA_DIRS
29+export PATH=$SNAP/bin:$SNAP/usr/bin:$PATH
30+
31+export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH:$SNAP/usr/lib:$LD_LIBRARY_PATH
32+export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/libunity:$LD_LIBRARY_PATH
33+export LD_LIBRARY_PATH=$SNAP/usr/lib/$ARCH/qt5/libs:$LD_LIBRARY_PATH
34+
35+online-accounts-hooks2
36+

Subscribers

People subscribed via source and target branches