mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-21 18:37:45 +08:00
19 lines
321 B
Bash
Executable File
19 lines
321 B
Bash
Executable File
#!/bin/bash
|
|
|
|
dir=${1:?first paramater with dir to work in is required}
|
|
pkg=${2:?second parameter with full name of the package is required}
|
|
main_pkg="$dir/main"
|
|
|
|
shortpkg="uniquepkgname"
|
|
|
|
mkdir -p "$main_pkg"
|
|
|
|
cat > "$main_pkg/main.go" <<EOL
|
|
package main
|
|
import (
|
|
$shortpkg "$pkg"
|
|
)
|
|
|
|
var Plugins = $shortpkg.Plugins
|
|
EOL
|