Created
April 26, 2020 14:18
-
-
Save veez21/f00d05f776870be3151ab954c04239cd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Installing FreeMem (drop_caches) by veez21 for Termux" | |
dir=/data/data/com.termux/files | |
dir2=$dir/home/.freemem | |
[ -d "$dir" ] || { echo "Termux not installed!"; exit 1; } | |
mkdir -p $dir2 | |
cd $dir2 | |
curl -s -o "freemem.sh" https://gist.githubusercontent.com/veez21/a7a8483b88fced8af7b8ce59d50f0663/raw/freemem | |
chmod a+x freemem.sh | |
if ! grep fmem $dir/home/.bashrc; | |
then | |
echo " | |
fmem() { | |
su -c ../home/.freemem/freemem.sh | |
} | |
" >> $dir/home/.bashrc | |
fi | |
source $dir/home/.bashrc | |
echo "Done" | |
echo "Enter 'fmem' to free memory." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment