rename _resetprop to resetprop
This commit is contained in:
parent
4fce5db93e
commit
6c6e651d79
5 changed files with 5 additions and 7 deletions
|
|
@ -67,22 +67,20 @@ class General:
|
||||||
z.extractall(self.extract_to)
|
z.extractall(self.extract_to)
|
||||||
|
|
||||||
def add_props(self):
|
def add_props(self):
|
||||||
bin_dir = os.path.join(self.copy_dir, "system", "bin")
|
bin_dir = os.path.join(self.copy_dir, "system", "etc")
|
||||||
resetprop_rc = os.path.join(
|
resetprop_rc = os.path.join(
|
||||||
self.copy_dir, "system/etc/init/resetprop.rc")
|
self.copy_dir, "system/etc/init/resetprop.rc")
|
||||||
if not os.path.isfile(os.path.join(bin_dir, "_resetprop")):
|
if not os.path.isfile(os.path.join(bin_dir, "resetprop")):
|
||||||
if not os.path.exists(bin_dir):
|
if not os.path.exists(bin_dir):
|
||||||
os.makedirs(bin_dir)
|
os.makedirs(bin_dir)
|
||||||
shutil.copy(os.path.join(
|
shutil.copy(os.path.join(
|
||||||
"./bin", self.arch[0], "_resetprop"), bin_dir)
|
"./bin", self.arch[0], "resetprop"), bin_dir)
|
||||||
os.chmod(os.path.join(bin_dir, "_resetprop"), 0o755)
|
os.chmod(os.path.join(bin_dir, "resetprop"), 0o755)
|
||||||
if not os.path.isfile(os.path.join(bin_dir, "resetprop.sh")):
|
if not os.path.isfile(os.path.join(bin_dir, "resetprop.sh")):
|
||||||
with open(os.path.join(bin_dir, "resetprop.sh"), "w") as f:
|
with open(os.path.join(bin_dir, "resetprop.sh"), "w") as f:
|
||||||
f.write("#!/system/bin/sh\n")
|
f.write("#!/system/bin/sh\n")
|
||||||
f.write(
|
f.write(
|
||||||
"temp_dir=$(mktemp -d);ln -s /system/bin/_resetprop \"${temp_dir}/resetprop\"\n")
|
"while read line; do /system/etc/resetprop ${line%=*} ${line#*=}; done < /vendor/waydroid.prop\n")
|
||||||
f.write(
|
|
||||||
"while read line; do \"${temp_dir}/resetprop\" ${line%=*} ${line#*=}; done < /vendor/waydroid.prop\n")
|
|
||||||
os.chmod(os.path.join(bin_dir, "resetprop.sh"), 0o755)
|
os.chmod(os.path.join(bin_dir, "resetprop.sh"), 0o755)
|
||||||
if not os.path.isfile(resetprop_rc):
|
if not os.path.isfile(resetprop_rc):
|
||||||
if not os.path.exists(os.path.dirname(resetprop_rc)):
|
if not os.path.exists(os.path.dirname(resetprop_rc)):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue