-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaddPacks.sh
More file actions
executable file
·34 lines (29 loc) · 905 Bytes
/
addPacks.sh
File metadata and controls
executable file
·34 lines (29 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash -e
if [ -z ${cmHome+x} ]; then
while true; do
read -p "Enter the path to the build dir: " -e cmHome;
if ( [[ -d $cmHome/build ]]; [[ -d $cmHome/android ]]; [[ -d $cmHome/.repo ]] ) then
break;
fi
echo "Not a build dir. Try again."
done
fi
securegen="$(dirname "$(pwd)")"
securegenApps=$securegen/apps
#Check if the apps repo is present
if [ ! -d "$securegenApps" ]; then
echo "Missing apps repo."
echo "Downloading..."
git clone git@github.com:Securegen/apps.git $securegenApps
fi
cmPackages=$cmHome/packages/apps
cmCommonFull=$cmHome/vendor/cm/config/common_full.mk
if grep -Fxq "#Packages included by Securegen" $cmCommonFull; then
echo "Packs already added."
echo "See our README for info on how to edit packs after inclusion."
else
echo "Adding packages..."
cp -R $securegenApps/*/ $cmPackages
cat $securegenApps/secGenPacks.txt >> $cmCommonFull
echo "Done."
fi