Skip to content

Commit

Permalink
regenerate scaffolding
Browse files Browse the repository at this point in the history
  • Loading branch information
can3p committed Apr 5, 2024
1 parent c3cf23d commit 9880323
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@

dist/

sackmesser
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "",
Use: "sackmesser",
Short: "A small additional tool to superpower your cobra cli",
Long: `A small additional tool to superpower your cobra cli`,
// Uncomment the following line if your bare application
Expand All @@ -37,7 +37,7 @@ func init() {
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.

// rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/..yaml)")
// rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.sackmesser.yaml)")

// Cobra also supports local flags, which will only run
// when this action is called directly.
Expand Down
2 changes: 1 addition & 1 deletion generated/buildinfo/buildinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func GithubRepo() string {
}

func ProjectName() string {
return ""
return "sackmesser"
}

func Commit() string {
Expand Down
22 changes: 11 additions & 11 deletions generated/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ main() {
version="v$1"
fi

release_uri="https://github.com/can3p/sackmesser/releases/download/$version/_${os}_${arch}.tar.gz"
release_uri="https://github.com/can3p/sackmesser/releases/download/$version/sackmesser_${os}_${arch}.tar.gz"
echo "Getting version $version, $release_uri"

install_path="${CUSTOM_INSTALL:-$HOME}"

bin_dir="$install_path/bin"
ts=$(date +%s)
tmp_dir="$install_path/_tmp$ts"
exe="$bin_dir/"
tmp_dir="$install_path/sackmesser_tmp$ts"
exe="$bin_dir/sackmesser"

mkdir -p "$bin_dir"
mkdir -p "$tmp_dir"
Expand All @@ -36,17 +36,17 @@ main() {
# be a good citizen and clean up after yourself
trap cleanup EXIT

curl -q --fail --location --progress-bar --output "$tmp_dir/.tar.gz" "$release_uri"
curl -q --fail --location --progress-bar --output "$tmp_dir/sackmesser.tar.gz" "$release_uri"
# extract to tmp dir so we don't open existing executable file for writing:
tar -C "$tmp_dir" -xzf "$tmp_dir/.tar.gz"
chmod +x "$tmp_dir/"
tar -C "$tmp_dir" -xzf "$tmp_dir/sackmesser.tar.gz"
chmod +x "$tmp_dir/sackmesser"
# atomically rename into place:
mv "$tmp_dir/" "$exe"
rm "$tmp_dir/.tar.gz"
mv "$tmp_dir/sackmesser" "$exe"
rm "$tmp_dir/sackmesser.tar.gz"

echo " was installed successfully to $exe"
if command -v >/dev/null; then
echo "Run ' help' to get started"
echo "sackmesser was installed successfully to $exe"
if command -v sackmesser >/dev/null; then
echo "Run 'sackmesser help' to get started"
else
case $SHELL in
/bin/zsh) shell_profile=".zshrc" ;;
Expand Down

0 comments on commit 9880323

Please sign in to comment.