Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

Commit

Permalink
fix(1Password): post script was missing a few things
Browse files Browse the repository at this point in the history
  • Loading branch information
scottames committed Jul 18, 2023
1 parent f809dd3 commit 41517e5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
22 changes: 20 additions & 2 deletions scripts/post/1Password.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,25 @@
set -oeux pipefail

mv /var/opt/1Password \
/usr/share/1Password
/usr/share/1Password

sed -i 's|^Exec=/opt/1Password/1password %U|Exec=/usr/share/1Password/1password %U|' \
/usr/share/applications/1password.desktop
/usr/share/applications/1password.desktop

rm /usr/bin/1password
ln -s /usr/share/1Password/1password /usr/bin/1password

# CLI
#https://cache.agilebits.com/dist/1P/op2/pkg/v2.19.0/op_linux_amd64_v2.19.0.zip
echo "Installing 1Password"

cd "$(mktemp -d)"

if [ ! "$(getent group onepassword-cli)" ]; then
groupadd onepassword-cli
fi

chgrp onepassword-cli /usr/bin/op
chmod g+s /usr/bin/op

op --version
7 changes: 7 additions & 0 deletions scripts/pre/1Password.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -oeux pipefail

if [ ! "$(getent group onepassword-cli)" ]; then
groupadd -g 1010 onepassword-cli
fi

0 comments on commit 41517e5

Please sign in to comment.