-
Notifications
You must be signed in to change notification settings - Fork 1
/
grm.vars
89 lines (79 loc) · 3.05 KB
/
grm.vars
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
##################################################################################
# Copyright 2022 steadfasterX <steadfasterX |at| gmail - com>
# Copyright 2023 steadfasterX <steadfasterX |at| gmail - com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
##################################################################################
#
# GRM - [G]rapheneOS [R]epo [M]anager
#
# global variables
#
# include this with:
# source grm.vars
#
##################################################################################
export MYPATH="${0%/*}"
unset RMPATTERN
## binaries
export YAD="/usr/bin/yad"
export GIT=/usr/bin/git
export LAFTERM="/usr/bin/xterm"
export CURLB="/usr/bin/env curl"
export FBBIN="/usr/bin/fastboot"
export DFBIN="/bin/df"
export AWKBIN="/bin/awk"
export GREPBIN="/bin/grep"
export EGREPBIN="/bin/egrep"
export TRBIN="/bin/tr"
## some commands require root perms (mainly mount/unmount)
export PWREXEC="/usr/bin/pkexec"
## basic stuff
export LC_ALL=C
export VDIG="2.0"
export TNAME="GRM"
export TFULLNAME="$TNAME - [G]rapheneOS [R]epo [M]anager"
export VERSION="${VDIG}"
export YTITLE="$TNAME - $VERSION"
# metadata version on the apps repo
export REPO_VER=1
## paths
export FOREIGNPATH="$MYPATH/foreign"
export APASTE="$FOREIGNPATH/usr/bin/anypaste"
export SICONS="$MYPATH/icons"
export ALTSDATPATH="/usr/bin"
export LOG="/tmp/${TNAME}.log"
export UPLPATH="~/upload"
export REMLOGPATH="~/log"
export REMLOG="${REMLOGPATH}/${TNAME}.log"
## misc
export FYAD="$YAD --title ${TNAME}-v$VERSION --center --window-icon=$SICONS/grm_mini.png"
export LOCKFILE="/tmp/${TNAME}.lock"
export PYTHONBIN="/usr/bin/env python3"
# repo server
export SSHKEY="$MYPATH/ssh/${TNAME}_ed25519"
export UPDATEEXEC=update.sh
export APPSRCS='Google!GrapheneOS' # see README, do not change here but in custom.vars!
export CHANNELS='stable!beta' # do not change here but in custom.vars!
# remove these pattern from log before uploading
# (delimiter is a space. patterns get replaced by SED so chars like / must be escaped)
# do NOT touch this variable here, instead export the variable RMUSRPATTERN in custom.vars!
# default when unset are these:
export RMPATTERN="$SSHUSER $REPOSERVER $RMUSRPATTERN"
#######################################################################################################
# NO CHANGES AFTER THIS LINE!
#
# source custom vars if avail
[ -f "$MYPATH/custom.vars" ] && source "$MYPATH/custom.vars" && echo "sourced custom.vars successfully"
# NO CHANGES AFTER THIS LINE!
#######################################################################################################