(chore): nano: Better syntax

This commit is contained in:
Rashil Gandhi 2023-02-01 09:57:30 +05:30 committed by GitHub
parent b54cc68e5d
commit 54ac67b397
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,6 @@
"homepage": "https://www.nano-editor.org/", "homepage": "https://www.nano-editor.org/",
"license": "GPL-3.0-only", "license": "GPL-3.0-only",
"notes": [ "notes": [
"Configure nano interface, colors, key assignments and more by typing nano ~/.nanorc",
"Default folders have been updated, no custom setting has been modified. Find a backup of", "Default folders have been updated, no custom setting has been modified. Find a backup of",
"the old config file at \"$dir\\.nanorc.bak\"", "the old config file at \"$dir\\.nanorc.bak\"",
"Visit https://github.com/okibcn/nano-for-windows for more information." "Visit https://github.com/okibcn/nano-for-windows for more information."
@ -13,12 +12,14 @@
"hash": "92ad91f7178edfb343e28984ef591a9b7368dc8ab84a6fa3657e684fec1b2231", "hash": "92ad91f7178edfb343e28984ef591a9b7368dc8ab84a6fa3657e684fec1b2231",
"bin": "nano.exe", "bin": "nano.exe",
"pre_install": [ "pre_install": [
"$arch=if ($architecture -match '64') {'x86_64'} else {'i686'}", "$arch = if ($architecture -match '64') {'x86_64'} else {'i686'}",
"$scoopdir=$scoopdir -replace '\\\\','/'", "$scoopdir = $scoopdir -replace '\\\\','/'",
"if (-not (Test-Path ~/.nanorc)){", "if (-not (Test-Path ~/.nanorc)) {",
" Move-Item \"$dir/.nanorc\" ~/.nanorc", " Move-Item \"$dir/.nanorc\" ~/.nanorc",
" Add-Content ~/.nanorc \"include `\"$scoopdir/apps/nano/current/syntax/*.nanorc`\"\"}", " Add-Content ~/.nanorc \"include `\"$scoopdir/apps/nano/current/syntax/*.nanorc`\"\"",
"else{Copy-Item ~/.nanorc \"$dir/.nanorc.bak\"}", "} else {",
" Copy-Item ~/.nanorc \"$dir/.nanorc.bak\"",
"}",
"Move-Item \"$dir/pkg_$arch-w64-mingw32/bin/*\" \"$dir\"", "Move-Item \"$dir/pkg_$arch-w64-mingw32/bin/*\" \"$dir\"",
"Move-Item \"$dir/pkg_$arch-w64-mingw32/share/nano\" \"$dir/syntax\" -Force", "Move-Item \"$dir/pkg_$arch-w64-mingw32/share/nano\" \"$dir/syntax\" -Force",
"Remove-Item \"$dir/pkg*\" -Force -Recurse", "Remove-Item \"$dir/pkg*\" -Force -Recurse",