diff options
author | SanskritFritz | 2016-07-15 23:09:15 +0200 |
---|---|---|
committer | SanskritFritz | 2016-07-15 23:09:15 +0200 |
commit | 3b44c0ee8de59fe67da7376212a5a4a19484b8dc (patch) | |
tree | 42bd05de8d3c487016b13e3dc45067d113e363c3 /d2x-rebirth.install | |
parent | cd0f5ed7ddde9e40386a32d727cf38eb47507c7d (diff) | |
download | aur-3b44c0ee8de59fe67da7376212a5a4a19484b8dc.tar.gz |
Minor changes to conform recommendations.
Diffstat (limited to 'd2x-rebirth.install')
-rwxr-xr-x | d2x-rebirth.install | 71 |
1 files changed, 2 insertions, 69 deletions
diff --git a/d2x-rebirth.install b/d2x-rebirth.install index 4ac737bab015..01e1e54803d5 100755 --- a/d2x-rebirth.install +++ b/d2x-rebirth.install @@ -1,74 +1,8 @@ post_install() { - function install_datas() { - read -p "I'm about to install Descent 2 datas to /usr/share/d2x-rebirth/, would you like to continue (Y/n) ? " - case $REPLY in - n|N) return 1;; - esac - type unarj &> /dev/null - if (($?)); then - echo 'I need unarj to continue'; - read -p 'Do you want install it (Y/n) ? ' - case $REPLY in - n|N) return 1;; - esac - pacman -Sy unarj || return 2 - fi - - cont=1 - while (($cont)); do - echo 'Give me the complete path to "descent2.sow" file (example, with the cd drive : /path/to/drive/d2data/descent2.sow)' - read - if [ -z "$REPLY" ]; then return 2; fi - if [ -f "$REPLY" ]; then - cont=0; - else - echo -e "Bad path (Enter to abort)\n" - fi - done +echo 'Put your Descent 2 data files either to /usr/share/d2x-rebirth/ or ~/.d2x-rebirth/' - descent_file="$REPLY" - - cd /usr/share/d2x-rebirth/ - unarj e "$descent_file" &> /dev/null - if (($?)); then echo -e '!! Error with unarj !!\n' >&2; return 2; fi - rm *.exe *.dll *.txt *.bat descent.cfg descentg.ini \ - descent.hi *.doc eregcard.ini &>/dev/null - - read -p 'Would you like to include movies files (need 210 MB more space) (N/y) ? ' - case $REPLY in - y|Y) :;; - *) return 0;; - esac - - cont=1 - while (($cont)); do - echo 'Give me the complete path to the directory that contains those movies (example, with the cd drive : /path/to/drive/d2data/)' - read - if [ -z "$REPLY" ]; then return 2; fi - if [ -d "$REPLY" ]; then - cont=0; - else - echo -e "Bad path (Enter to abort)\n" - fi - done - - movies_path="$REPLY" - cp "$movies_path"/*-h.mvl . &> /dev/null - - chmod 644 * &> /dev/null - return 0 - } - - old_path=`pwd` - install_datas - ret=$? - cd $old_path - - if (($ret)); then - echo 'Put your Descent 2 datas either to /usr/share/d2x-rebirth/ or ~/.d2x-rebirth/' - - cat << EOF +cat << EOF Following files are needed to run the game: descent2.ham @@ -100,7 +34,6 @@ You can get AddOns for the game from http://www.dxx-rebirth.com/addons/ EOF - fi } post_upgrade() { |