Skip to content

Commit

Permalink
replace all '/home/pi' with $HOME (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
Person1873 authored Jan 7, 2024
1 parent 3463e6e commit 9050f67
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion install/install_windows.bat
Original file line number Diff line number Diff line change
@@ -1 +1 @@
plink -ssh -v -pw raspberry pi@192.168.0.31 -m setup.sh
plink -ssh -v -pw raspberry pi@192.168.0.31 -m setup.sh
20 changes: 10 additions & 10 deletions install/on_rpi/on_pi_setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cd /home/pi/bthidhub/install/on_rpi
cd $HOME/bthidhub/install/on_rpi

sudo echo 0 | sudo tee /sys/class/leds/ACT/brightness > /dev/null

Expand All @@ -21,11 +21,11 @@ systemctl --user disable obex
systemctl --user mask obex

sudo apt-get install libcairo2-dev libdbus-1-dev libgirepository1.0-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev autoconf automake libtool python3-pip -y
sudo pip3 install -r /home/pi/bthidhub/requirements.txt
sudo pip3 install -r $HOME/bthidhub/requirements.txt

cd /home/pi/bthidhub/install/on_rpi
cd $HOME/bthidhub/install/on_rpi
git clone https://github.com/Dreamsorcerer/bluez.git
cd /home/pi/bthidhub/install/on_rpi/bluez
cd $HOME/bthidhub/install/on_rpi/bluez
autoreconf -fvi

./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --disable-a2dp --disable-avrcp --disable-network
Expand All @@ -35,12 +35,12 @@ make -j4
sudo systemctl disable bluetooth
sudo systemctl stop bluetooth
sudo make install
sudo python3 /home/pi/bthidhub/install/on_rpi/config_replacer.py
sudo cp /home/pi/bthidhub/install/on_rpi/sdp_record.xml /etc/bluetooth/sdp_record.xml
sudo cp /home/pi/bthidhub/install/on_rpi/input.conf /etc/bluetooth/input.conf
sudo cp /home/pi/bthidhub/install/on_rpi/main.conf /etc/bluetooth/main.conf
sudo python3 $HOME/bthidhub/install/on_rpi/config_replacer.py
sudo cp $HOME/bthidhub/install/on_rpi/sdp_record.xml /etc/bluetooth/sdp_record.xml
sudo cp $HOME/bthidhub/install/on_rpi/input.conf /etc/bluetooth/input.conf
sudo cp $HOMR/bthidhub/install/on_rpi/main.conf /etc/bluetooth/main.conf

sudo cp /home/pi/bthidhub/install/on_rpi/remapper.service /lib/systemd/system/remapper.service
sudo cp $HOME/bthidhub/install/on_rpi/remapper.service /lib/systemd/system/remapper.service
sudo chmod 644 /lib/systemd/system/remapper.service
sudo systemctl daemon-reload

Expand All @@ -54,7 +54,7 @@ sudo sed -Ei 's/^127\.0\.1\.1.*$/127.0.1.1\tbthidhub/' /etc/hosts

# Compile some Python modules to reduce lag.
# We do this at the end, as the project is already usable without this step.
cd /home/pi/bthidhub/
cd $HOME/bthidhub/
mypyc

sudo reboot
4 changes: 2 additions & 2 deletions install/setup.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cd /home/pi
cd $HOME

sudo apt-get update
sudo apt-get upgrade -y
sudo apt-get install git -y

git clone https://github.com/ruundii/bthidhub
cd /home/pi/bthidhub/install/on_rpi
cd $HOME/bthidhub/install/on_rpi
bash ./on_pi_setup.sh

0 comments on commit 9050f67

Please sign in to comment.