Skip to content

Commit 703c633

Browse files
author
arch
committed
improve linux install script
1 parent db7c681 commit 703c633

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

contrib/OpenFunscripter/openfunscripter_setup_linux.sh

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,23 @@ echo "install required packages"
1212
if command -v apt; then
1313
# debian based distro:
1414
sudo apt install -y curl
15-
sh <(curl -L https://nixos.org/nix/install) --daemon --yes
1615

17-
if [ -f /etc/profile.d/nix.sh ]; then
18-
. /etc/profile.d/nix.sh
19-
fi
20-
21-
if [ -f /home/$USER/.nix-profile/etc/profile.d/nix.sh ]; then
22-
. /home/$USER/.nix-profile/etc/profile.d/nix.sh
16+
if ! command -v nix; then
17+
sh <(curl -L https://nixos.org/nix/install) --daemon --yes
2318
fi
2419

2520
echo "Install OFS AppImage dependencies"
2621
sudo apt install -y fuse
2722
fi
2823

24+
if [ -f /etc/profile.d/nix.sh ]; then
25+
. /etc/profile.d/nix.sh
26+
fi
27+
28+
if [ -f /home/$USER/.nix-profile/etc/profile.d/nix.sh ]; then
29+
. /home/$USER/.nix-profile/etc/profile.d/nix.sh
30+
fi
31+
2932
if ! command -v nix; then
3033
echo "This installer require the package manager nix"
3134
exit 1

0 commit comments

Comments
 (0)