Skip to content

Commit

Permalink
Change multiline strings to arrays (ScoopInstaller#2363)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Smith II authored and Richard Kuhnt committed Jul 7, 2018
1 parent e7451ec commit 5e8a0fe
Show file tree
Hide file tree
Showing 31 changed files with 236 additions and 214 deletions.
12 changes: 6 additions & 6 deletions bucket/apache.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"bin\\logresolve.exe",
"bin\\rotatelogs.exe"
],
"post_install": "
# set directory in httpd.conf
$conf = \"$dir/conf/httpd.conf\"
$root=(scoop which httpd | split-path -res -par | split-path -par) -replace '\\\\', '/';
(gc $conf) | % { $_ -replace 'c:/Apache24', \"$root\" } | sc $conf
",
"post_install": [
"# set directory in httpd.conf",
"$conf = \"$dir/conf/httpd.conf\"",
"$root=(scoop which httpd | split-path -res -par | split-path -par) -replace '\\\\', '/';",
"(gc $conf) | % { $_ -replace 'c:/Apache24', \"$root\" } | sc $conf"
],
"checkver": {
"url": "https://fossies.org/search?q=folder_search&q1=httpd&ad=%2Ffresh%2Fwindows%2Fwww&ca=yes&dp=1",
"re": "httpd-([\\d.]+)-win64-VC15.zip"
Expand Down
6 changes: 3 additions & 3 deletions bucket/bfg.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
]
},
"bin": "bfg.ps1",
"pre_install": "
write-output ('java -jar {0}\\bfg-{1}.jar $args' -f \"$dir\", \"$version\") | out-file -filepath $dir\\bfg.ps1
",
"pre_install": [
"write-output ('java -jar {0}\\bfg-{1}.jar $args' -f \"$dir\", \"$version\") | out-file -filepath $dir\\bfg.ps1"
],
"checkver": {
"url": "https://search.maven.org/solrsearch/select/?q=g:com.madgag+AND+a:bfg",
"jp": "$.response.docs[0].latestVersion"
Expand Down
22 changes: 11 additions & 11 deletions bucket/busybox.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@
}
}
},
"post_install": "
if(!(test-path ~/.profile)) {
'creating ~/.profile'
@\"
if [ -e ~/.bashrc ]
then
source ~/.bashrc
fi
\"@ | out-file -en oem ~/.profile
}
",
"post_install": [
"if(!(test-path ~/.profile)) {",
" 'creating ~/.profile'",
"@\"",
"if [ -e ~/.bashrc ]",
"then",
" source ~/.bashrc",
"fi",
"\"@ | out-file -en oem ~/.profile",
"}"
],
"bin": [
"busybox.exe",
[
Expand Down
19 changes: 10 additions & 9 deletions bucket/git-up.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,16 @@
"hash": "d7db91bb8c5d5a5d4635dee380ed496ca6a7da9903504357b752e0b396da327c",
"extract_dir": "PyGitUp-1.5.0",
"depends": "python",
"post_install": "
pushd \"$dir\"
try {
scoop reset python
iex \"$(scoop which python) setup.py install\"
}
finally {
popd
}",
"post_install": [
"pushd \"$dir\"",
"try {",
" scoop reset python",
" iex \"$(scoop which python) setup.py install\"",
"}",
"finally {",
" popd",
"}"
],
"checkver": "github",
"autoupdate": {
"url": "https://github.com/msiemens/PyGitUp/archive/v$version.zip",
Expand Down
14 changes: 8 additions & 6 deletions bucket/git.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@
"post_install": [
"git config --global credential.helper manager"
],
"notes": "To get Git to recognise OpenSSH, you will need to run

scoop install openssh
[environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER')

and then restart powershell.",
"notes": [
"To get Git to recognise OpenSSH, you will need to run",
"",
"scoop install openssh",
"[environment]::setenvironmentvariable('GIT_SSH', (resolve-path (scoop which ssh)), 'USER')",
"",
"and then restart powershell."
],
"checkver": {
"url": "https://github.com/git-for-windows/git/releases/latest",
"re": "v(?<version>[\\d\\w.]+)/PortableGit-(?<short>[\\d.]+).*\\.exe"
Expand Down
10 changes: 5 additions & 5 deletions bucket/go.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
"url": "$url.sha256"
}
},
"notes": "
Your GOROOT has been set to: $dir
You can run 'go env GOROOT' to view this at any time.
\"$env:USERPROFILE\\go\\bin)\" has been added to your PATH.
"
"notes": [
"Your GOROOT has been set to: $dir",
"You can run 'go env GOROOT' to view this at any time.",
"\"$env:USERPROFILE\\go\\bin)\" has been added to your PATH."
]
}
14 changes: 7 additions & 7 deletions bucket/gow.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"url": "https://github.com/bmatzelle/gow/releases",
"re": "<a.*?>Gow ([\\d.]+)</a>"
},
"pre_install": "
\"@cscript //NoLogo \"\"$dir\\bin\\gow.vbs\"\" %1\" | Set-Content -force \"$dir\\bin\\gow.bat\"
",
"post_install": "
# create etc directory (required by bash), if needed
if (! (test-path \"$dir\\etc\")) { new-item -itemtype directory \"$dir\\etc\" }
",
"pre_install": [
"\"@cscript //NoLogo \"\"$dir\\bin\\gow.vbs\"\" %1\" | Set-Content -force \"$dir\\bin\\gow.bat\""
],
"post_install": [
"# create etc directory (required by bash), if needed",
"if (! (test-path \"$dir\\etc\")) { new-item -itemtype directory \"$dir\\etc\" }"
],
"bin": [
"bin\\awk.exe",
"bin\\basename.exe",
Expand Down
10 changes: 5 additions & 5 deletions bucket/haxe.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
"HAXEPATH": "$dir"
},
"depends": "neko",
"pre_install": "
if(Test-Path \"$dir\\haxe_*\") {
Move-Item -Force \"$dir\\haxe_*\\*\" \"$dir\"
}
",
"pre_install": [
"if(Test-Path \"$dir\\haxe_*\") {",
" Move-Item -Force \"$dir\\haxe_*\\*\" \"$dir\"",
"}"
],
"checkver": {
"github": "https://github.com/HaxeFoundation/haxe"
},
Expand Down
16 changes: 9 additions & 7 deletions bucket/inadyn-mt.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,15 @@
],
"extract_dir": "inadyn-mt.v.02.28.10",
"hash": "f69bea12d96b66f9f662a8df0730c60457b24f5fb5308b109936880ebf7be5ca",
"notes": "To install and run as a service:
> notepad $dir\\bin\\win32\\inadyn-mt.conf
> cd \"$dir\\bin\\win32\"
> sudo .\\inadyn-mt -i
> sudo .\\inadyn-mt -s

For help, see $dir\\readme.html",
"notes": [
"To install and run as a service:",
"> notepad $dir\\bin\\win32\\inadyn-mt.conf",
"> cd \"$dir\\bin\\win32\"",
"> sudo .\\inadyn-mt -i",
"> sudo .\\inadyn-mt -s",
"",
"For help, see $dir\\readme.html"
],
"persist": [
"bin/win32/inadyn-mt.conf",
"bin/win32/inadyn-mt.log",
Expand Down
6 changes: 4 additions & 2 deletions bucket/jruby.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
"java/openjdk"
]
},
"notes": "Install a JDK and set JAVA_HOME if you don't already have. JRuby won't work without it.
Also note that this installation overrides GEM_HOME and GEM_PATH from any previous Ruby or JRuby installation.",
"notes": [
"Install a JDK and set JAVA_HOME if you don't already have. JRuby won't work without it.",
"Also note that this installation overrides GEM_HOME and GEM_PATH from any previous Ruby or JRuby installation."
],
"checkver": {
"url": "http://jruby.org/download",
"re": "Current Release:\\s+JRuby\\s+([\\d.]+)"
Expand Down
6 changes: 2 additions & 4 deletions bucket/mariadb.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@
"if (!(Test-Path \"$dir\\data\\auto.cnf\")) { mysqld --initialize-insecure }"
],
"notes": [
"Run following command as administrator to run MariaDB as a service.
",
"mysqld --install \"[Service Name(default:MySQL)]\"
"
"Run following command as administrator to run MariaDB as a service.",
"mysqld --install \"[Service Name(default:MySQL)]\""
],
"checkver": {
"url": "https://downloads.mariadb.org/",
Expand Down
10 changes: 5 additions & 5 deletions bucket/mongodb.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"bin\\mongostat.exe",
"bin\\mongotop.exe"
],
"post_install": "
# create initial directories
if(!(test-path 'C:\\data')) { mkdir 'C:\\data' > $null }
if(!(test-path 'C:\\data\\db')) { mkdir 'C:\\data\\db' > $null }
",
"post_install": [
"# create initial directories",
"if(!(test-path 'C:\\data')) { mkdir 'C:\\data' > $null }",
"if(!(test-path 'C:\\data\\db')) { mkdir 'C:\\data\\db' > $null }"
],
"checkver": {
"url": "https://www.mongodb.com/download-center",
"re": "Current Stable Release \\(([\\d.]+)\\)"
Expand Down
13 changes: 7 additions & 6 deletions bucket/msmpi.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,13 @@
"architecture": {
"64bit": {
"installer": {
"script": "
7z x -r \"$dir\\tmp\\4.msi\" -o\"$dir\"
Remove-Item \"$dir\\msmpires.dll\"
Remove-Item \"$dir\\msmpi.dll\"
Rename-Item \"$dir\\msmpires64.dll\" \"$dir\\msmpires.dll\"
Rename-Item \"$dir\\msmpi64.dll\" \"$dir\\msmpi.dll\""
"script": [
"7z x -r \"$dir\\tmp\\4.msi\" -o\"$dir\"",
"Remove-Item \"$dir\\msmpires.dll\"",
"Remove-Item \"$dir\\msmpi.dll\"",
"Rename-Item \"$dir\\msmpires64.dll\" \"$dir\\msmpires.dll\"",
"Rename-Item \"$dir\\msmpi64.dll\" \"$dir\\msmpi.dll\""
]
}
},
"32bit": {
Expand Down
20 changes: 10 additions & 10 deletions bucket/mysql.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@
"persist": [
"data"
],
"post_install": "
#Initialize data directory (without generating root password)
if (!(Test-Path \"$dir\\data\\auto.cnf\")) {
mysqld --initialize-insecure
}
#Output client configuration to my.ini file so no username is required when connecting
echo \"\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append
echo \"[client]\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append
echo \"user=root\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append
",
"post_install": [
"#Initialize data directory (without generating root password)",
"if (!(Test-Path \"$dir\\data\\auto.cnf\")) {",
" mysqld --initialize-insecure",
"}",
"#Output client configuration to my.ini file so no username is required when connecting",
"echo \"\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append",
"echo \"[client]\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append",
"echo \"user=root\" | out-file \"$dir/my.ini\" -Encoding ASCII -Append"
],
"checkver": {
"url": "https://dev.mysql.com/downloads/mysql/",
"re": "<h1>MySQL Community Server ([\\d.]+)"
Expand Down
14 changes: 8 additions & 6 deletions bucket/nano.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@
"hash": "c012456b9f29e488b0e9a688aa43a34326dd573f9e99765cbdac2b81a4bc1060",
"bin": "nano.exe",
"extract_dir": "nano-2.5.3-win32",
"post_install": "if (-not (Test-Path ~/nano.rc)) { Copy-Item \"$dir/nano.rc\" ~/nano.rc }",
"post_install": [
"if (-not (Test-Path ~/nano.rc)) { Copy-Item \"$dir/nano.rc\" ~/nano.rc }"
],
"checkver": "Latest Version\\s+([\\d.]+)",
"notes": "
You can configure nano editor by editing the configuration file nano.rc
in your home folder. For nano to find the configuration file, you will
need to set %HOME% environment variable to point to your home folder.
"
"notes": [
"You can configure nano editor by editing the configuration file nano.rc",
"in your home folder. For nano to find the configuration file, you will",
"need to set %HOME% environment variable to point to your home folder."
]
}
8 changes: 4 additions & 4 deletions bucket/nim.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
},
"depends": "gcc",
"extract_dir": "nim-0.18.0",
"post_install": "
# Copy Nimble package
Copy-Item -Recurse \"$dir\\dist\\nimble\\src\\nimblepkg\" \"$dir\\bin\"
",
"post_install": [
"# Copy Nimble package",
"Copy-Item -Recurse \"$dir\\dist\\nimble\\src\\nimblepkg\" \"$dir\\bin\""
],
"bin": [
"bin\\c2nim.exe",
"bin\\makelink.exe",
Expand Down
6 changes: 4 additions & 2 deletions bucket/nssm.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
}
}
},
"notes": "Manage Services with NSSM (GUI based) (e.g., 'nssm install nginx' to install nginx as service gui will popup or 'nssm start/status/stop apache').
Visit https://nssm.cc/commands for more info"
"notes": [
"Manage Services with NSSM (GUI based) (e.g., 'nssm install nginx' to install nginx as service gui will popup or 'nssm start/status/stop apache').",
"Visit https://nssm.cc/commands for more info"
]
}
20 changes: 13 additions & 7 deletions bucket/nvm.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,23 @@
"hash": "975697d7a3ab697060fe71ffbb37dba7ff2120295ead3e75799f935ca7403135",
"architecture": {
"64bit": {
"pre_install": "if(!(test-path \"$dir\\settings.txt\")) {
write-output \"root: $persist_dir\\nodejs`r`narch: 64`r`nproxy: none\" | Out-File -encoding \"ASCII\" \"$dir\\settings.txt\"
}"
"pre_install": [
"if(!(test-path \"$dir\\settings.txt\")) {",
" write-output \"root: $persist_dir\\nodejs`r`narch: 64`r`nproxy: none\" | Out-File -encoding \"ASCII\" \"$dir\\settings.txt\"",
"}"
]
},
"32bit": {
"pre_install": "if(!(test-path \"$dir\\settings.txt\")) {
write-output \"root: $persist_dir\\nodejs`r`narch: 32`r`nproxy: none\" | Out-File -encoding \"ASCII\" \"$dir\\settings.txt\"
}"
"pre_install": [
"if(!(test-path \"$dir\\settings.txt\")) {",
" write-output \"root: $persist_dir\\nodejs`r`narch: 32`r`nproxy: none\" | Out-File -encoding \"ASCII\" \"$dir\\settings.txt\"",
"}"
]
}
},
"notes": "You'll need to restart powershell/cmd to have it reload Environment Variables so nvm will work correctly",
"notes": [
"You'll need to restart powershell/cmd to have it reload Environment Variables so nvm will work correctly"
],
"autoupdate": {
"url": "https://github.com/coreybutler/nvm-windows/releases/download/$version/nvm-noinstall.zip"
}
Expand Down
Loading

0 comments on commit 5e8a0fe

Please sign in to comment.