Skip to content

Commit

Permalink
Adds if else for Mac 2nd time
Browse files Browse the repository at this point in the history
#5

Co-authored-by: Markus Hampel <[email protected]>
  • Loading branch information
joergi and markus-hampel committed Sep 13, 2024
1 parent 61c7c31 commit c97bc7a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion superexport.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ if [ ! -f $superexportfolder/.secretreader.sh ]; then
chmod +x $superexportfolder/.secretreader.sh
fi

secretreader="export $1=\$(secret-tool lookup \$USER $secretname)"
if [[ "$(uname)" == 'Darwin' ]]; then
echo "mac unten"
secretreader="export $1=\$(launchctl setenv \$secretname \"$secretname\")"
elif [[ "$(uname)" == 'Linux' ]]; then
echo "linux unten"
secretreader="export $1=\$(secret-tool lookup \$USER $secretname)"
fi

echo -e $secretreader >> $superexportfolder/.secretreader.sh

0 comments on commit c97bc7a

Please sign in to comment.