Announcement

Collapse
No announcement yet.

ruinstall.sh

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • ruinstall.sh

    #!/bin/bash

    # ruinstall.sh
    # Version 0.1
    # This script downloads and installs Russian graphics to Seven Kingdoms: Ancient Adversaries

    # README
    # Run this in the terminal:
    # chmod +x ruinstall.sh
    # Then run: ./ruinstall.sh

    # Options
    # help - Display this text.
    # stable - Download and install stable graphics.
    # fargus - Download and install Fargus graphics.
    # gsc - Download and install GSC Game World graphics.
    # fenix - Download and install Phoenix Games Ltd. graphics.

    echo -n "Enter option: "
    read option
    if [ "$option" == "help" ]; then
    echo "help - Display this text.
    stable - Download and install stable graphics.
    fargus - Download and install Fargus graphics.
    gsc - Download and install GSC Game World graphics.
    fenix - Download and install Phoenix Games Ltd. graphics."
    exit 1
    fi

    # Fetch tarball && makedir

    mkdir $HOME/7kaa_data/

    if [ "$option" == "stable" ]; then
    wget "www.7kaa_data_RUS.tar.xz.ru" && echo "Success" || "Failure"
    tar -xvf 7kaa_data_RUS.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
    fi

    if [ "$option" == "fargus" ]; then
    wget www.7kaa_data_Fargus.tar.xz.ru && echo "Success" || "Failure"
    tar -xzf 7kaa_data_Fargus.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
    fi

    if [ "$option" == "gsc" ]; then
    wget www.7kaa_data_GSC.tar.xz.ru && echo "Success" || "Failure"
    tar -xzf 7kaa_data_GSC.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
    fi

    if [ "$option" == "fenix" ]; then
    wget www.7kaa_data_Phoenix.tar.xz.ru && echo "Success" || "Failure"
    tar -xvf 7kaa_data_Phoenix.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
    fi

    # Check Version

    echo -n "Enter version: "

    ## Official Release

    read name
    if [ "$name" == "2.15.1" ]; then
    SKFANSPATH="$HOME/7kaa-2.15.1/data/" && echo SKFANSPATH=$SKFANSPATH

    # copy ./7kaa_data/RESOURCE/ to $SKFANSPATH
    cp -vr $HOME/7kaa_data/RESOURCE/ $SKFANSPATH/

    # cp -vr ./7kaa_data/ENCYC/ $SKFANSPATH
    # cp -vr ./7kaa_data/ENCYC1/ $SKFANSPATH

    ## 2.15.x-dev git snapshot

    elif [ "$name" == "2.15.2-dev" ]; then
    SKFANSPATHDEV="$HOME/7kaa/data/" && echo SKFANSPATHDEV=$SKFANSPATHDEV
    elif echo "Wrong Version"; then
    exit
    fi

    # copy ./7kaa_data/RESOURCE/ to $SKFANSPATHDEV
    cp -vr $HOME/7kaa_data/RESOURCE/ $SKFANSPATHDEV/

    # cp -vr ./7kaa_data/ENCYC/ $SKFANSPATHDEV
    # cp -vr ./7kaa_data/ENCYC1/ $SKFANSPATHDEV

  • #2
    Avant-garde enough

    Comment


    • #3
      I call it Le Bash Script

      Comment


      • #4
        I like it, took me a few re reads but good concept of sorts data eske

        Comment


        • #5
          no one is gonna say how shitty this script is? lol

          Comment


          • #6
            Originally posted by _loki View Post
            no one is gonna say how shitty this script is? lol

            Originally posted by _loki View Post

            if [ "$option" == "stable" ]; then
            wget "www.7kaa_data_RUS.tar.xz.ru" && echo "Success" || "Failure"
            tar -xvf 7kaa_data_RUS.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
            fi

            if [ "$option" == "fargus" ]; then
            wget www.7kaa_data_Fargus.tar.xz.ru && echo "Success" || "Failure"
            tar -xzf 7kaa_data_Fargus.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
            fi

            if [ "$option" == "gsc" ]; then
            wget www.7kaa_data_GSC.tar.xz.ru && echo "Success" || "Failure"
            tar -xzf 7kaa_data_GSC.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
            fi

            if [ "$option" == "fenix" ]; then
            wget www.7kaa_data_Phoenix.tar.xz.ru && echo "Success" || "Failure"
            tar -xvf 7kaa_data_Phoenix.tar.xz -C ./7kaa_data/ --strip-components=1 && cd ./7kaa_data/ || exit
            fi
            Well, ^^^ this part could have looked more laconic with a case/esac switch instead of four if-thens. (although, I myself don't like switch much)
            Last edited by VandalValo; 06-29-2019, 03:16 PM.

            Comment


            • #7
              Yeah, I didn't want to attempt with a case on my first script. Really, I should just download the stable graphics as the others are shit/unstable. And i was very unhappy with using --strip-components=1 with tar

              Comment

              Working...
              X