mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 04:37:00 +00:00
[c12586] Add delayed starting for mmap extraction to ExtractResources
This commit is contained in:
parent
21d5c42aa4
commit
d087f89a40
2 changed files with 28 additions and 4 deletions
|
|
@ -26,6 +26,7 @@ USE_AD="0"
|
||||||
USE_VMAPS="0"
|
USE_VMAPS="0"
|
||||||
USE_MMAPS="0"
|
USE_MMAPS="0"
|
||||||
USE_MMAPS_OFFMESH="0"
|
USE_MMAPS_OFFMESH="0"
|
||||||
|
USE_MMAPS_DELAY=""
|
||||||
|
|
||||||
if [ "$1" = "a" ]
|
if [ "$1" = "a" ]
|
||||||
then
|
then
|
||||||
|
|
@ -33,6 +34,7 @@ then
|
||||||
USE_AD="1"
|
USE_AD="1"
|
||||||
USE_VMAPS="1"
|
USE_VMAPS="1"
|
||||||
USE_MMAPS="1"
|
USE_MMAPS="1"
|
||||||
|
USE_MMAPS_DELAY="no"
|
||||||
else
|
else
|
||||||
## do some questioning!
|
## do some questioning!
|
||||||
echo
|
echo
|
||||||
|
|
@ -58,7 +60,7 @@ else
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "Should mmaps be extracted? (y/n)"
|
echo "Should mmaps be extracted? (y/n)"
|
||||||
echo "WARNING! This will take several hours!"
|
echo "WARNING! This will take several hours! (you can later tell to start delayed)"
|
||||||
read line
|
read line
|
||||||
if [ "$line" = "y" ]
|
if [ "$line" = "y" ]
|
||||||
then
|
then
|
||||||
|
|
@ -82,11 +84,13 @@ then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Obtain numbe ob processes
|
## MMap Extraction specific
|
||||||
if [ "$USE_MMAPS" = "1" ]
|
if [ "$USE_MMAPS" = "1" ]
|
||||||
then
|
then
|
||||||
|
## Obtain number of processes
|
||||||
echo "How many CPUs should be used for extracting mmaps? (1-4)"
|
echo "How many CPUs should be used for extracting mmaps? (1-4)"
|
||||||
read line
|
read line
|
||||||
|
echo
|
||||||
if [ "$line" -ge "1" -a "$line" -le "4" ]
|
if [ "$line" -ge "1" -a "$line" -le "4" ]
|
||||||
then
|
then
|
||||||
NUM_CPU=$line
|
NUM_CPU=$line
|
||||||
|
|
@ -94,10 +98,25 @@ then
|
||||||
echo "Only number between 1 and 4 supported!"
|
echo "Only number between 1 and 4 supported!"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
## Extract MMaps delayed?
|
||||||
|
if [ "$USE_MMAPS_DELAY" != "no" ]; then
|
||||||
|
echo "MMap extraction can be started delayed"
|
||||||
|
echo "If you do _not_ want MMap Extraction to start delayed, just press return"
|
||||||
|
echo "Else enter number followed by s for seconds, m for minutes, h for hours"
|
||||||
|
echo "Example: \"3h\" - will start mmap extraction in 3 hours"
|
||||||
|
read -p"MMap Extraction Delay (leave blank for direct extraction): " USE_MMAPS_DELAY
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
USE_MMAPS_DELAY=""
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Give some status
|
## Give some status
|
||||||
echo "Current Settings: Extract DBCs/maps: $USE_AD, Extract vmaps: $USE_VMAPS, Extract mmaps: $USE_MMAPS on $NUM_CPU processes"
|
echo "Current Settings: Extract DBCs/maps: $USE_AD, Extract vmaps: $USE_VMAPS, Extract mmaps: $USE_MMAPS on $NUM_CPU processes"
|
||||||
|
if [ "$USE_MMAPS_DELAY" != "" ]; then
|
||||||
|
echo "MMap Extraction will be started delayed by $USE_MMAPS_DELAY"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
if [ "$1" != "a" ]
|
if [ "$1" != "a" ]
|
||||||
then
|
then
|
||||||
echo "If you don't like this settings, interrupt with CTRL+C"
|
echo "If you don't like this settings, interrupt with CTRL+C"
|
||||||
|
|
@ -158,5 +177,10 @@ fi
|
||||||
## Extract mmaps
|
## Extract mmaps
|
||||||
if [ "$USE_MMAPS" = "1" ]
|
if [ "$USE_MMAPS" = "1" ]
|
||||||
then
|
then
|
||||||
MoveMapGen.sh $NUM_CPU $LOG_FILE $DETAIL_LOG_FILE
|
if [ "$USE_MMAPS_DELAY" != "" ]; then
|
||||||
|
echo "Extracting of MMaps is set to be started delayed by $USE_MMAPS_DELAY"
|
||||||
|
echo "Current time: $(date)"
|
||||||
|
sleep $USE_MMAPS_DELAY
|
||||||
|
fi
|
||||||
|
sh MoveMapGen.sh $NUM_CPU $LOG_FILE $DETAIL_LOG_FILE
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12585"
|
#define REVISION_NR "12586"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue