You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
84 lines
1.6 KiB
84 lines
1.6 KiB
#!/bin/bash
|
|
|
|
update_me(){
|
|
clear;s3logo
|
|
local_revision=0
|
|
online_revision=0
|
|
source "$configdir/urls"
|
|
s3local="$dldir/s3_github"
|
|
printf " s3_git CHECK:\n -------------\n"
|
|
|
|
if [ -d "$s3local/.svn" ]
|
|
then
|
|
local_revision=$(gitrevision $s3local)
|
|
fi
|
|
|
|
online_revision=$(gitrevision $s3url)
|
|
if [ ! "$local_revision" == "$online_revision" ]
|
|
then
|
|
printf " update s3_git to\n Local Revision: $online_revision\n"
|
|
svn -q checkout "$s3url" "$s3local"
|
|
cd "$s3local"
|
|
printf " update all files ...\n\n"
|
|
yes | cp -rf ./s3 "$workdir/s3"
|
|
yes | cp -rf ./support/* "$workdir/support"
|
|
else
|
|
printf " is up to date\n Online Revision: $online_revision\n\n"
|
|
fi
|
|
sleep 1
|
|
}
|
|
|
|
update_emu(){
|
|
clear
|
|
s3logo
|
|
local_revision=0
|
|
online_revision=0
|
|
source "$configdir/urls"
|
|
emulocal="$dldir/emu_github"
|
|
printf " emu_git CHECK:\n --------------\n"
|
|
|
|
if [ -d "$emulocal/.svn" ]
|
|
then
|
|
local_revision=$(gitrevision $emulocal)
|
|
fi
|
|
|
|
online_revision=$(gitrevision $emuurl)
|
|
if [ ! "$local_revision" == "$online_revision" ]
|
|
then
|
|
printf " update emu_git to\n Local Revision: $online_revision\n"
|
|
svn -q checkout "$emuurl" "$emulocal"
|
|
else
|
|
printf " is up to date\n Online Revision: $online_revision\n"
|
|
fi
|
|
if [ -f "$emulocal/VERSION" ]
|
|
then
|
|
printf " EmuVersion: "
|
|
grep '\$Version:' "$emulocal/VERSION" |cut -d " " -f 2
|
|
_nl
|
|
fi
|
|
sleep 1
|
|
}
|
|
|
|
fix_me(){
|
|
clear
|
|
s3logo
|
|
source "$configdir/urls"
|
|
s3local="$dldir/s3_github"
|
|
emulocal="$dldir/emu_github"
|
|
|
|
if [ -d "$s3local" ]
|
|
then
|
|
rm -rf $s3local
|
|
update_me
|
|
else
|
|
update_me
|
|
fi
|
|
|
|
if [ -d "$emulocal" ]
|
|
then
|
|
rm -rf $emulocal
|
|
update_emu
|
|
else
|
|
update_emu
|
|
fi
|
|
}
|
|
|