Skip to content

Commit

Permalink
added special cacti install script
Browse files Browse the repository at this point in the history
  • Loading branch information
tome215 committed Sep 26, 2024
1 parent f10fcd7 commit 61c84b1
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 10 deletions.
15 changes: 15 additions & 0 deletions install-cacti.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -x

cd $HOME

source .bashrc
source .profile

cd /local

cargo update --manifest-path /local/pythia/Cargo.toml -p lexical-core
cargo update --manifest-path /local/pythia/pythia_server/Cargo.toml -p lexical-core
cargo install --locked --path /local/pythia
cargo install --locked --path /local/pythia/pythia_server
24 changes: 14 additions & 10 deletions setup-cacti.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@ if [ -f $OURDIR/setup-pythia-done ]; then
exit 0
fi

sudo apt-get pkg-config -y
sudo apt-get install pkg-config -y

# shellcheck disable=SC2045
for user in $(ls /users)
do
su $user -c "bash /local/repository/setup-rust.sh"
sudo chsh $user --shell /bin/bash
done

# shellcheck disable=SC2164
Expand All @@ -35,15 +36,18 @@ chown geniuser -R /local/pythia

mkdir dotfiles

echo "phase 0" >> cargo_phases.txt
su geniuser -c "cargo update --manifest-path /local/pythia/Cargo.toml -p lexical-core" > /local/lc0_out.txt 2> /local/lc0_err.txt
echo "phase 1" >> cargo_phases.txt
su geniuser -c "cargo update --manifest-path /local/pythia/pythia_server/Cargo.toml -p lexical-core" > /local/lc1_out.txt 2> /local/lc1_err.txt
echo "phase 2" >> cargo_phases.txt
su geniuser -c "cargo install --locked --path /local/pythia" > /local/pythia_out.txt 2> /local/pythia_err.txt
echo "phase 3" >> cargo_phases.txt
su geniuser -c "cargo install --locked --path /local/pythia/pythia_server" > /local/pythia_server_out.txt 2> /local/pythia_server_err.txt
echo "phase 4" >> cargo_phases.txt
#echo "phase 0" >> cargo_phases.txt
#su geniuser -c "cargo update --manifest-path /local/pythia/Cargo.toml -p lexical-core" > /local/lc0_out.txt 2> /local/lc0_err.txt
#echo "phase 1" >> cargo_phases.txt
#su geniuser -c "cargo update --manifest-path /local/pythia/pythia_server/Cargo.toml -p lexical-core" > /local/lc1_out.txt 2> /local/lc1_err.txt
#echo "phase 2" >> cargo_phases.txt
#su geniuser -c "cargo install --locked --path /local/pythia" > /local/pythia_out.txt 2> /local/pythia_err.txt
#echo "phase 3" >> cargo_phases.txt
#su geniuser -c "cargo install --locked --path /local/pythia/pythia_server" > /local/pythia_server_out.txt 2> /local/pythia_server_err.txt
#echo "phase 4" >> cargo_phases.txt

su geniuser -c "bash install-cacti.sh"

sudo ln -s /users/geniuser/.cargo/bin/pythia_server /usr/local/bin/
sudo ln -s /users/geniuser/.cargo/bin/pythia /usr/bin/pythia
sudo ln -s /local/pythia /users/geniuser/
Expand Down

0 comments on commit 61c84b1

Please sign in to comment.