Ysflight Installer script for linux

Questions, comments, concerns, & fixes
Post Reply
Deleted User 2987

Ysflight Installer script for linux

Post 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!
Last edited by Deleted User 2987 on Mon May 01, 2017 2:15 am, edited 4 times in total.
User avatar
Flake
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

Re: Ysflight Installer script for linux

Post 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! ;)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!
User avatar
u2fly
Senior Veteran
Senior Veteran
Posts: 1485
Joined: Fri Oct 02, 2015 9:27 am
Favorite Aircraft: Antonov An-225 Mriya
Location: Ukraine
OS: Linux
Has thanked: 1051 times
Been thanked: 339 times

Re: Ysflight Installer script for linux

Post by u2fly »

Here is repo with Ysflight installer script on Github

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”

pic.twitter.com/vkz0gdozVV [archived]
(31 DEC 2016)
User avatar
Welshy
Staff
Staff
Posts: 2042
Joined: Thu Feb 24, 2011 4:53 pm
Favorite Aircraft: Sea Jet
Location: Wales
OS: Windows NT
Has thanked: 249 times
Been thanked: 254 times
Contact:

Re: Ysflight Installer script for linux

Post by Welshy »

But it must be noted you have no version control doing it this way
YSFHQ Elected Overlord
Overlord of VMFA-125 (CVW-171)
Previously Supreme Overlord of 323rd CAW
Friendly Neighbourhood Miscreant
Head Honcho at Talking Aero and British Defence
If you see me post like this in a thread pay attention!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests