mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +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_MMAPS="0"
|
||||
USE_MMAPS_OFFMESH="0"
|
||||
USE_MMAPS_DELAY=""
|
||||
|
||||
if [ "$1" = "a" ]
|
||||
then
|
||||
|
|
@ -33,6 +34,7 @@ then
|
|||
USE_AD="1"
|
||||
USE_VMAPS="1"
|
||||
USE_MMAPS="1"
|
||||
USE_MMAPS_DELAY="no"
|
||||
else
|
||||
## do some questioning!
|
||||
echo
|
||||
|
|
@ -58,7 +60,7 @@ else
|
|||
|
||||
echo
|
||||
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
|
||||
if [ "$line" = "y" ]
|
||||
then
|
||||
|
|
@ -82,11 +84,13 @@ then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
## Obtain numbe ob processes
|
||||
## MMap Extraction specific
|
||||
if [ "$USE_MMAPS" = "1" ]
|
||||
then
|
||||
## Obtain number of processes
|
||||
echo "How many CPUs should be used for extracting mmaps? (1-4)"
|
||||
read line
|
||||
echo
|
||||
if [ "$line" -ge "1" -a "$line" -le "4" ]
|
||||
then
|
||||
NUM_CPU=$line
|
||||
|
|
@ -94,10 +98,25 @@ then
|
|||
echo "Only number between 1 and 4 supported!"
|
||||
exit 1
|
||||
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
|
||||
|
||||
## Give some status
|
||||
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" ]
|
||||
then
|
||||
echo "If you don't like this settings, interrupt with CTRL+C"
|
||||
|
|
@ -158,5 +177,10 @@ fi
|
|||
## Extract mmaps
|
||||
if [ "$USE_MMAPS" = "1" ]
|
||||
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue