• 車種別
  • パーツ
  • 整備手帳
  • ブログ
  • みんカラ+
イイね!
2010年07月04日

ACE2 Update Script

ACE2のアップデートスクリプト

主な変更場所は、以下のとおり、RSYNCのタイムアウトが長かったので、15秒にしました。

ARMA_DIR:ARMA2本体があるパスを指定します。
ARMA_SYNC_DIR:ACE2のパッチを落とす作業ディレクトリ。ARMA2DIRとは別のディレクトリを指定します。



#!/bin/bash
#
# ACE Update script for linux
#
# by Dr.Pulp - www.FAKKer.de
#
#
#
# READ FIRST!!!
#
# In order to use this script you need to have gunzip and rsync installed!
#
# You will also need two seperate folders to use the advantage of rsync,
# because otherwise "tolower" will alter the filenames and rsync will download
# them again everytime you use the script.
#
# After the script finish succsessfully, you will have new folders depending of the number
# of mods you like to synchronize. the folders a called like the mod with a leading @.
#
##################################
# Configuration start #
##################################

# Directory where the arma server is installed
ARMA_DIR=/home/arma

# Direcotry where rsync stores the data. DON'T use a subdirectory of your arma directory!
ARMA_SYNC_DIR=/home/arma_data

# List of available Mirrors. You can add new mirrors, or delete ones that are no longer functioning. Leave a blank between mirrors!
MIRRORLIST=(dev-heaven.net s01.6thsense.eu s02.6thsense.eu 64.34.164.115 arma2.armagoons.com 213.245.0.237 six.bssnet.dk zeus2.zeus-community.net)

# Mods you like to synchronize with this script. For a complete list of available mods look at http://updater.dev-heaven.net/main !
# You can use every mod listet there -> just use the modname without @. Leave a blank between mods!
MODS="ace acex cba acex_pla fran_quesh_kibrul gl4 isla_duala japahto jtd namalsk panthera sap_everon six"

##################################
# Advanced Configuration #
##################################
# Define some of the OS tool the script uses. If you encounter an error you can check is your pathnames may differ with the type command. example: type rm
# this will tell you your exact path to your rm. in case it differs, edit this part...otherwise leave it as it is.
RM="/bin/rm -r"
RSYNC="/usr/bin/rsync --times --timeout=15 -O --no-whole-file -r --delete --progress -h --exclude=.rsync rsync://"
CP="/bin/cp -r"
GUNZIP="/bin/gunzip -r"
##################################
# Configuration end #
##################################

# Function: random mirror selection
RANDOM_MIRROR() {
MIRRORCOUNT=${#MIRRORLIST[*]}
MIRRORCOUNT=`expr $MIRRORCOUNT - 1`
MIRRORCOUNT=`expr 32767 / $MIRRORCOUNT`
MIRROR=${MIRRORLIST[$(($RANDOM/$MIRRORCOUNT))]}
}

# Loop: deleting folder, rsync, decompress ad copy for each mod you selected
for MOD in $MODS
do
$RM $ARMA_DIR/@$MOD
INFOSYNC='Starting to synchronize '$MOD'!'
echo ' ----------------'
echo $INFOSYNC
OK=1
BAILOUT=0
until [ "$OK" -lt "1" ]
do
RANDOM_MIRROR
$RSYNC$MIRROR/rel/$MOD/./.pack/ ${ARMA_SYNC_DIR}/@$MOD
OK=$?
BAILOUT=`expr $BAILOUT + 1`
if [ "$BAILOUT" -gt 10 ]
then
ENDE='There is a problem with rsync of mod '$MOD'! Aborting Script to prevent a loop! Check your directorys, user-rights or maybe just all mirrors are full at the moment'
echo $ENDE
exit
fi
done
INFOCOPY='Copying '$MOD' Mod to the destination folder!'
echo $INFOCOPY
$CP ${ARMA_SYNC_DIR}/@$MOD ${ARMA_DIR}
INFOZIP='Decompressing '$MOD' Mod!'
echo $INFOZIP
$GUNZIP ${ARMA_DIR}/@$MOD/*
done

# Converting filenames to lower case letters
${ARMA_DIR}/tolower

# copying keys, mpmissions and userconfig to the right folders
for MOD in $MODS
do
if test -e ${ARMA_DIR}/@$MOD/keys
then $CP ${ARMA_DIR}/@$MOD/keys/* ${ARMA_DIR}/keys
fi
if test -e ${ARMA_DIR}/@$MOD/mpmissions
then $CP ${ARMA_DIR}/@ace/mpmissions/* ${ARMA_DIR}/mpmissions
fi
if test -e ${ARMA_DIR}/@$MOD/userconfig
then
if test -e ${ARMA_DIR}/userconfig/$MOD
then
$CP ${ARMA_DIR}/@$MOD/userconfig/* ${ARMA_DIR}/userconfig/$MOD/
else
/bin/mkdir -p ${ARMA_DIR}/userconfig/$MOD
$CP ${ARMA_DIR}/@$MOD/userconfig/* ${ARMA_DIR}/userconfig/$MOD/
fi
fi
if test -e ${ARMA_DIR}/@$MOD/store/userconfig
then
if test -e ${ARMA_DIR}/userconfig/$MOD
then
$CP ${ARMA_DIR}/@$MOD/store/userconfig/* ${ARMA_DIR}/userconfig/$MOD/
else
/bin/mkdir -p ${ARMA_DIR}/userconfig/$MOD
$CP ${ARMA_DIR}/@$MOD/store/userconfig/* ${ARMA_DIR}/userconfig/$MOD/
fi
fi
done
exit

ブログ一覧 | ARMA2 Server | パソコン/インターネット
Posted at 2010/07/04 15:32:09

イイね!0件



今、あなたにおすすめ

ブログ人気記事

60系プリウス シーケンシャルドア ...
YOURSさん

素人がパジェロミニをリフトアップす ...
いなかっぺはちさん

猫侵入を受けて木曜日を迎えました( ...
kuroharri3さん

TEAM♦️MEISTER ♦️v ...
taka4348さん

いかにも古いクルマ☺️
ベイサさん

4月14日、関西舞子サンデーかじや ...
大吟醸 ZIMAさん

この記事へのコメント

コメントはありません。

プロフィール

「[整備] #サンバー 純正スローブローヒューズ交換 https://minkara.carview.co.jp/userid/137019/car/3502840/7710410/note.aspx
何シテル?   03/16 13:06
■ペット ネイチャーアクアリウムにハマって、熱帯魚買っています。 60cm水槽と30cm水槽あります。 ■ゲーム 「ARMA3」や「MikuMikuDa...

ハイタッチ!drive

みんカラ新規会員登録

ユーザー内検索

<< 2024/3 >>

     12
3456789
10111213141516
17181920212223
24252627282930
31      

ブログカテゴリー

リンク・クリップ

フロントブレーキダブルディスク化 
カテゴリ:その他(カテゴリ未設定)
2023/01/20 19:19:09
ボンネット内デッドニング!準備編 
カテゴリ:その他(カテゴリ未設定)
2013/09/08 21:24:21
ボンネット内デッドニング! 
カテゴリ:その他(カテゴリ未設定)
2013/09/08 21:23:17

愛車一覧

カワサキ Ninja ZX-25R SE KRT EDITION カワサキ Ninja ZX-25R SE KRT EDITION
Ninja ZX25R KRT に載ってます
ダイハツ タントエグゼカスタム ダイハツ タントエグゼカスタム
今日決めてきました。 燃費もよくなったので、楽しみです。 主に通勤用として使います
スバル サンバー スバル サンバー
トランポ専用車として2023.10.04購入。 購入時の走行距離13万8千キロ
その他 その他 その他 その他
Roland のV-Drum TD-12KX-Sです。 Girls Dead Monst ...

過去のブログ

2023年
01月02月03月04月05月06月
07月08月09月10月11月12月
2022年
01月02月03月04月05月06月
07月08月09月10月11月12月
2021年
01月02月03月04月05月06月
07月08月09月10月11月12月
2020年
01月02月03月04月05月06月
07月08月09月10月11月12月
2019年
01月02月03月04月05月06月
07月08月09月10月11月12月
2018年
01月02月03月04月05月06月
07月08月09月10月11月12月
2017年
01月02月03月04月05月06月
07月08月09月10月11月12月
2016年
01月02月03月04月05月06月
07月08月09月10月11月12月
2015年
01月02月03月04月05月06月
07月08月09月10月11月12月
2014年
01月02月03月04月05月06月
07月08月09月10月11月12月
2013年
01月02月03月04月05月06月
07月08月09月10月11月12月
2012年
01月02月03月04月05月06月
07月08月09月10月11月12月
2011年
01月02月03月04月05月06月
07月08月09月10月11月12月
2010年
01月02月03月04月05月06月
07月08月09月10月11月12月
2009年
01月02月03月04月05月06月
07月08月09月10月11月12月
2008年
01月02月03月04月05月06月
07月08月09月10月11月12月
2007年
01月02月03月04月05月06月
07月08月09月10月11月12月
2006年
01月02月03月04月05月06月
07月08月09月10月11月12月
2005年
01月02月03月04月05月06月
07月08月09月10月11月12月
ヘルプ利用規約サイトマップ

あなたの愛車、今いくら?

複数社の査定額を比較して愛車の最高額を調べよう!

あなたの愛車、今いくら?
メーカー
モデル
年式
走行距離(km)
© LY Corporation