Skip to content

Commit 9c1ddbb

Browse files
committedNov 14, 2014
Warn during installation if total memory is below 2GB
1 parent 2d040cb commit 9c1ddbb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
 

‎install-reddit.sh

+9
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,15 @@ if [ "$DISTRIB_ID" != "Ubuntu" -o "$DISTRIB_RELEASE" != "12.04" ]; then
8282
exit 1
8383
fi
8484

85+
if [[ "2000000" -gt $(awk '/MemTotal/{print $2}' /proc/meminfo) ]]; then
86+
LOW_MEM_PROMPT="reddit requires at least 2GB of memory to work properly, continue anyway? [y/n] "
87+
read -er -n1 -p "$LOW_MEM_PROMPT" response
88+
if [[ "$response" != "y" ]]; then
89+
echo "Quitting."
90+
exit 1
91+
fi
92+
fi
93+
8594
###############################################################################
8695
# Install prerequisites
8796
###############################################################################

0 commit comments

Comments
 (0)
Please sign in to comment.