Giter VIP home page Giter VIP logo

inline's Introduction

Hi there ๐Ÿ‘‹

Carlo Corradini's github stats

inline's People

Contributors

carlocorradini avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

inline's Issues

๐Ÿš€ [REQUEST] - deprecate default in-file name

Reference Issues

No response

Summary

what do you think of deprecating the default name for the input-file and name the output-file something like original-script-name.inlined.sh?

could be more intuitive when running the command without parameter, which currently lead to script.sh not found instead of the help/usage screen.

Basic Example

Drawbacks

No response

๐Ÿ› [BUG] - readlink: unrecognized option: m

Description

running the script on alpine/busybox fails with the following error:

readlink: unrecognized option: m
BusyBox v1.35.0 (2022-11-19 10:13:10 UTC) multi-call binary.

Usage: readlink [-fnv] FILE

Display the value of a symlink

        -f      Canonicalize by following all symlinks
        -n      Don't add newline
        -v      Verbose

Reproduction steps

on `alpine:3.17.0` run:

bash inline.sh --in-file test.sh

test.sh

#!/bin/ash

echo "hello"
source header.sh

header.sh

# fail on non-zero exit code
set -e -o pipefail -o errexit

OS

Alpine Linux Busybox

hopefully helpful links:

Silent log level

Reference Issues

No response

Summary

Add a silent log level to disable logging

Basic Example

--log-level silent

Drawbacks

No response

๐Ÿš€ [REQUEST] - source from cwd or from sourced script

just to share my thoughts, having a folder structure like that:

โ”œโ”€โ”€ bin
โ”‚ย ย  โ””โ”€โ”€ main.sh
            source templates/test/a.sh
โ””โ”€โ”€ templates
    โ””โ”€โ”€ test
        โ”œโ”€โ”€ a.sh
                echo this is a
                source templates/test/b.sh # required for regular bash script usage
                vs
                source b.sh # required with inline.sh
        โ””โ”€โ”€ b.sh
                echo this is b

and running main.sh from the root dir leads to an error like:

bash bin/main.sh
...
[FATAL] Unable to resolve source file path ...
[FATAL] Error inlining file ...

it works if source is used without path but then the usage breaks if i want to run it with a native bash call and vice versa.

some option like --relative-sourcing vs --source-from-cwd could be helpful

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.