Page 1 of 1

Ysflight Installer script for linux

Posted: Sat Apr 29, 2017 6:46 pm
by Deleted User 2987
Make a file with your favorite text editor called install.sh (you can name it whatever you want!)

Code: Select all

#!/bin/bash
sudo mkdir  /home/$SUDO_USER/ysflightinstaller
sudo mkdir /home/$SUDO_USER/ysflight
sudo wget https://forum.ysfhq.com/download/file.php?id=499 -P /home/$SUDO_USER/ysflightinstaller
cd   /home/$SUDO_USER/ysflightinstaller
sudo unzip * 
sudo cp -r /home/$SUDO_USER/ysflightinstaller/Ysflight/ysflight/* /home/$SUDO_USER/ysflight
cd /home/$SUDO_USER/ysflight
sudo chmod +x ysflight*
sudo rm  /usr/bin/ysflight
sudo echo "#!/bin/bash" >> /usr/bin/ysflight
sudo echo "cd /home/$SUDO_USER/ysflight" >> /usr/bin/ysflight
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
  sudo echo " ./ysflight64_gl1" >> /usr/bin/ysflight
else
  sudo echo " ./ysflight32_gl1" >> /usr/bin/ysflight
fi
sudo chmod +x /usr/bin/ysflight
sudo rm -rf /home/$SUDO_USER/ysflightinstaller
sudo chmod -R +777 /home/$SUDO_USER/ysflight
ysflight


Code: Select all

sudo chmod +x install.sh
(this will make it executable)

Code: Select all

sudo ./install.sh
(Must run as SUDO!)



It should download and install in about a minute or less!
Ysflight will launch whenever you type ysflight in a terminal!

Re: Ysflight Installer script for linux

Posted: Sun Apr 30, 2017 12:17 am
by Flake
Merge your double posts, please just edit in future.

That said, this is a very useful script, I'm sure others will find this quite useful! ;)

Re: Ysflight Installer script for linux

Posted: Tue Apr 17, 2018 1:51 pm
by u2fly
Here is repo with Ysflight installer script on Github

Re: Ysflight Installer script for linux

Posted: Tue Apr 17, 2018 4:25 pm
by Welshy
But it must be noted you have no version control doing it this way