Skip to content

Commit

Permalink
If install_hotel.sh is run with token, configure hotel to use this to…
Browse files Browse the repository at this point in the history
…ken (#51)
  • Loading branch information
t-monaghan authored Oct 2, 2024
1 parent b9d803f commit dd31c2b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/install_hotel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,16 @@ install_hotel() {
INITIAL_DIR="$PWD"
TMPDIR=$(mktemp -d)
cd "$TMPDIR"
download_latest_hotel
download_latest_hotel
mkdir -p "$hotel_bin_path/"
mv hotel "$hotel_bin_path"
cd "$INITIAL_DIR"
rm -rf "$TMPDIR"
if [ -n "$github_token" ]; then
mkdir -p ~/.config/hotel
touch ~/.config/hotel/config.yaml
echo "github.token: $github_token" >> ~/.config/hotel/config.yaml
fi
log "=> installing hotel, this will ask for a sudo password"
sudo "$hotel_bin_path/hotel" setup launcher
}
Expand All @@ -95,7 +100,7 @@ main() {
github_token="$(security find-generic-password -s "com.cultureamp.hotel" -a github.app -w)"
fi

install_hotel
install_hotel
}

main "$@"

0 comments on commit dd31c2b

Please sign in to comment.