-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
diffusion_config.sh
71 lines (57 loc) · 1.44 KB
/
diffusion_config.sh
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
# Diffusion Installer Config
# osm0sis @ xda-developers
INST_NAME="Nano Installer Script";
AUTH_NAME="osm0sis @ xda-developers";
USE_ARCH=false
USE_ZIP_OPTS=true
custom_setup() {
return # stub
}
custom_zip_opts() {
return # stub
}
custom_target() {
# use /product/bin/nano if /system_ext/bin/nano exists to remain higher in $PATH
if [ -e /system/system_ext/bin/nano ]; then
TARGET=$TARGET/product;
fi;
}
custom_install() {
ui_print " ";
set_perm 0 0 755 $BIN/nano $BIN/nano.bin-arm $BIN/nano.bin-arm64;
if $BIN/nano.bin-arm64 --version >/dev/null 2>&1; then
ui_print "Installing nano (arm64) to $BIN ...";
mv -f $BIN/nano.bin-arm64 $BIN/nano.bin;
else
ui_print "Installing nano (arm) to $BIN ...";
mv -f $BIN/nano.bin-arm $BIN/nano.bin;
fi;
rm -f $BIN/nano.bin-arm*;
ui_print "Installing terminfo to $ETC ...";
if ! $BOOTMODE; then
ui_print "Installing nano recovery script to /sbin ...";
cp -rf sbin/* /sbin;
set_perm 0 0 755 /sbin/nano;
fi;
}
custom_postinstall() {
return # stub
}
custom_uninstall() {
return # stub
}
custom_postuninstall() {
return # stub
}
custom_cleanup() {
return # stub
}
custom_exitmsg() {
if ! $BOOTMODE && [ "$ACTION" == installation ]; then
ui_print " ";
ui_print "nano may now be run temporarily from";
ui_print "terminal/adb shell for this recovery session,";
ui_print "and from now on in booted Android.";
fi;
}
# additional custom functions