Refactor the multi-host salt install page.
[arvados.git] / services / crunch-dispatch-slurm / script.go
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 package dispatchslurm
6
7 import (
8         "strings"
9 )
10
11 func execScript(args []string) string {
12         s := "#!/bin/sh\nexec"
13         for _, w := range args {
14                 s += ` '`
15                 s += strings.Replace(w, `'`, `'\''`, -1)
16                 s += `'`
17         }
18         return s + "\n"
19 }