mirror of
https://github.com/status-im/status-react.git
synced 2025-01-09 18:46:19 +00:00
Jakub Sokołowski
46bd2b2e4c
Changes: - Add missing lazy assignment for OS_NAME, fixes double Nix shells - Moved `scripts/add-nix-gcroots.sh` to `nix/scripts/gcroots.sh` - Moved Nix package manager setup to `nix/scripts/setup.sh` - Created `nix/scripts/source.sh` to reuse in all Nix scripts - Created `STARTING_GUIDE.md` with instructions for contributors - Created `scripts/colors.sh` for definition of shell colors - Removed `scripts/setup` in favor of `nix/scripts/setup.sh` - Removed all of `scripts/lib` since it was useless Signed-off-by: Jakub Sokołowski <jakub@status.im>
23 lines
700 B
Bash
Executable File
23 lines
700 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# If this is not run on some machines react-native builds fail.
|
|
|
|
GIT_ROOT=$(cd "${BASH_SOURCE%/*}" && git rev-parse --show-toplevel)
|
|
source "${GIT_ROOT}/scripts/colors.sh"
|
|
|
|
if [[ "$(uname -s)" != Linux ]]; then
|
|
echo "inotify fix not applicable on non-linux OS"
|
|
exit
|
|
fi
|
|
|
|
watches=$(cat /proc/sys/fs/inotify/max_user_watches)
|
|
required_watches=524288
|
|
|
|
if [ $watches -lt $required_watches ]; then
|
|
echo -e "${YLW}fs.inotify.max_user_watches limit is too low ($watches). Increasing it.${RST}"
|
|
echo "fs.inotify.max_user_watches = $required_watches" | sudo tee -a /etc/sysctl.conf
|
|
sudo sysctl -p
|
|
else
|
|
echo -e "${GRN}fs.inotify.max_user_watches limit is high enough.${RST}"
|
|
fi
|