Ysflight Installer script for linux

Questions, comments, concerns, & fixes
Post Reply
User avatar
Squirel
Newbie
Newbie
Posts: 4
Joined: Sun Feb 05, 2017 8:59 pm
Favorite Aircraft: F-16c fighting falcon
OS: Arch Linux
Been thanked: 2 times

Ysflight Installer script for linux

Post by Squirel » Sat Apr 29, 2017 6:46 pm

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!
Last edited by Squirel on Mon May 01, 2017 2:15 am, edited 4 times in total.
Image

User avatar
Flake
Staff
Staff
Posts: 4224
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR1000RR (2004).
Location: Australia
OS: Windows 10 (x64)
Has thanked: 796 times
Been thanked: 1118 times
Contact:

Re: Ysflight Installer script for linux

Post by Flake » Sun Apr 30, 2017 12:17 am

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! ;)

User avatar
u2fly
Veteran
Veteran
Posts: 1170
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 651 times
Been thanked: 265 times
Contact:

Re: Ysflight Installer script for linux

Post by u2fly » Tue Apr 17, 2018 1:51 pm

Here is repo with Ysflight installer script on Github
/!\ READ YSFLIGHT HANDBOOK (.PDF) | updated 2017/05/03

U.S. Senator John McCain wrote:
“Spending #NewYearsEve w/ brave #Ukrainian Marines at a forward combat outpost - we stand w/ them in their fight against #Putin's aggression”
http://pic.twitter.com/vkz0gdozVV
(31 DEC 2016)

User avatar
Welshy
Staff
Staff
Posts: 1867
Joined: Thu Feb 24, 2011 4:53 pm
Favorite Aircraft: AgustaWestland AW189
Location: Chepstow, Old South Wales
OS: Windows 10
Has thanked: 183 times
Been thanked: 159 times
Contact:

Re: Ysflight Installer script for linux

Post by Welshy » Tue Apr 17, 2018 4:25 pm

But it must be noted you have no version control doing it this way

YSFHQ Elected Admin
Officer Commanding VMFA-125 (CVW-171)

If you see me post like this in a thread pay attention!
Image

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests