mirror of
https://github.com/ReVanced/revanced-manager.git
synced 2024-11-10 01:01:56 +01:00
refactor: Remove unnecessary quotation marks
This commit is contained in:
parent
5b1c89a0c5
commit
9680f0cf12
1 changed files with 8 additions and 10 deletions
|
@ -45,15 +45,15 @@ class RootAPI {
|
||||||
try {
|
try {
|
||||||
final StringBuffer commands = StringBuffer();
|
final StringBuffer commands = StringBuffer();
|
||||||
if (permissions.isNotEmpty) {
|
if (permissions.isNotEmpty) {
|
||||||
commands.writeln('chmod $permissions "$filePath"');
|
commands.writeln('chmod $permissions $filePath');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ownerGroup.isNotEmpty) {
|
if (ownerGroup.isNotEmpty) {
|
||||||
commands.writeln('chown $ownerGroup "$filePath"');
|
commands.writeln('chown $ownerGroup $filePath');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (seLinux.isNotEmpty) {
|
if (seLinux.isNotEmpty) {
|
||||||
commands.writeln('chcon $seLinux "$filePath"');
|
commands.writeln('chcon $seLinux $filePath');
|
||||||
}
|
}
|
||||||
|
|
||||||
await Root.exec(
|
await Root.exec(
|
||||||
|
@ -76,9 +76,7 @@ class RootAPI {
|
||||||
Future<List<String>> getInstalledApps() async {
|
Future<List<String>> getInstalledApps() async {
|
||||||
final List<String> apps = List.empty(growable: true);
|
final List<String> apps = List.empty(growable: true);
|
||||||
try {
|
try {
|
||||||
final String? res = await Root.exec(
|
final String? res = await Root.exec(cmd: 'ls $_revancedDirPath');
|
||||||
cmd: 'ls "$_revancedDirPath"',
|
|
||||||
);
|
|
||||||
if (res != null) {
|
if (res != null) {
|
||||||
final List<String> list = res.split('\n');
|
final List<String> list = res.split('\n');
|
||||||
list.removeWhere((pack) => pack.isEmpty);
|
list.removeWhere((pack) => pack.isEmpty);
|
||||||
|
@ -105,7 +103,7 @@ class RootAPI {
|
||||||
Future<void> removeOrphanedFiles() async {
|
Future<void> removeOrphanedFiles() async {
|
||||||
await Root.exec(
|
await Root.exec(
|
||||||
cmd: '''
|
cmd: '''
|
||||||
find "$_revancedDirPath" -type f -name original.apk -delete
|
find $_revancedDirPath -type f -name original.apk -delete
|
||||||
for file in "$_serviceDDirPath"/*; do
|
for file in "$_serviceDDirPath"/*; do
|
||||||
filename=\$(basename "\$file")
|
filename=\$(basename "\$file")
|
||||||
if [ -f "$_postFsDataDirPath/\$filename" ]; then
|
if [ -f "$_postFsDataDirPath/\$filename" ]; then
|
||||||
|
@ -142,7 +140,7 @@ class RootAPI {
|
||||||
|
|
||||||
Future<void> installServiceDScript(String packageName) async {
|
Future<void> installServiceDScript(String packageName) async {
|
||||||
await Root.exec(
|
await Root.exec(
|
||||||
cmd: 'mkdir -p "$_serviceDDirPath"',
|
cmd: 'mkdir -p $_serviceDDirPath',
|
||||||
);
|
);
|
||||||
final String mountScript = '''
|
final String mountScript = '''
|
||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
|
@ -177,8 +175,8 @@ class RootAPI {
|
||||||
final String newPatchedFilePath = '$_revancedDirPath/$packageName/base.apk';
|
final String newPatchedFilePath = '$_revancedDirPath/$packageName/base.apk';
|
||||||
await Root.exec(
|
await Root.exec(
|
||||||
cmd: '''
|
cmd: '''
|
||||||
mkdir -p "$_revancedDirPath/$packageName"
|
mkdir -p $_revancedDirPath/$packageName
|
||||||
cp "$patchedFilePath" "$newPatchedFilePath"
|
cp "$patchedFilePath" $newPatchedFilePath
|
||||||
''',
|
''',
|
||||||
);
|
);
|
||||||
await setPermissions(
|
await setPermissions(
|
||||||
|
|
Loading…
Reference in a new issue