Skip to content

Commit

Permalink
fix: 🐛 fix ln generation
Browse files Browse the repository at this point in the history
  • Loading branch information
tomgrv authored Dec 28, 2024
1 parent 86a5145 commit f2f1ccc
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 90 deletions.
16 changes: 16 additions & 0 deletions src/common-utils/_install-bin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/sh
set -e

### Init directories
caller_filename=$(ps -o args= $PPID)
caller_filepath=$(readlink -f ${caller_filename##/bin/sh})
export source=$(dirname $caller_filepath)
export feature=$(basename $source | sed 's/_.*$//')
export target=${1:-/usr/local/share}/$feature

### Create links to utils in /usr/local/bin
find $target -type f -name "_*.sh" -exec echo {} \; -exec chmod +x {} \; | while read file
do
link=/usr/local/bin/$(basename $file | sed 's/^_//;s/.sh$//')
ln -sf $file $link
done
2 changes: 1 addition & 1 deletion src/common-utils/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Common Utils",
"version": "1.1.5",
"version": "1.1.6",
"description": "Common utils for tomgrv/devcontainer-features",
"dependsOn": {
"ghcr.io/devcontainers/features/common-utils": {}
Expand Down
10 changes: 0 additions & 10 deletions src/common-utils/install-bin.sh

This file was deleted.

1 change: 1 addition & 0 deletions src/common-utils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ done

### Install this feature
$(dirname $0)/_install-feature.sh
$(dirname $0)/_install-bin.sh
36 changes: 0 additions & 36 deletions src/gitutils/install-stubs.sh

This file was deleted.

1 change: 1 addition & 0 deletions src/gitutils/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ set -e

### Install this feature
install-feature
install-stubs
2 changes: 1 addition & 1 deletion src/gitversion/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "GitVersion feature",
"version": "3.0.1",
"version": "3.0.2",
"description": "Add gitversion to your devcontainer",
"dependsOn": {
"ghcr.io/devcontainers/features/dotnet": "",
Expand Down
36 changes: 0 additions & 36 deletions src/gitversion/install-stubs.sh

This file was deleted.

1 change: 1 addition & 0 deletions src/gitversion/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ set -e

### Install feature
install-feature
install-stubs
5 changes: 5 additions & 0 deletions src/larasets/_art.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e

workspace=${containerWorkspaceFolder:-${CODESPACE_VSCODE_FOLDER:-.}}
[ -n "$LARAVEL_SAIL" ] && [ "$LARAVEL_SAIL" -eq 1 ] && sail artisan "$@" || php -d xdebug.mode=off $workspace/artisan "$@"
5 changes: 5 additions & 0 deletions src/larasets/_sail.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e

workspace=${containerWorkspaceFolder:-${CODESPACE_VSCODE_FOLDER:-.}}
[ -f sail ] && echo sail || echo $workspace/vendor/bin/sail
5 changes: 0 additions & 5 deletions src/larasets/configure-aliases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ fi
$SUDO cat <<EOF >~/.bash_aliases
alias gitv='gitversion'
alias sail='sh $([ -f sail ] && echo sail || echo ${containerWorkspaceFolder:-.}/vendor/bin/sail)'
art() {
test -n "\$LARAVEL_SAIL" && test "\$LARAVEL_SAIL" -eq 1 && sail artisan "\$@" || php -d xdebug.mode=off \${CODESPACE_VSCODE_FOLDER:-.}/artisan "\$@"
} && export -f art
srv() {
test -n "\$LARAVEL_SAIL" && test "\$LARAVEL_SAIL" -eq 1 && sail npx --yes pm2 "\$@" || npx --yes pm2 "\$@"
Expand Down
2 changes: 1 addition & 1 deletion src/larasets/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Laravel settings",
"version": "3.0.2",
"version": "3.0.3",
"description": "A feature to add useful laravel settings to your shell.",
"containerEnv": {
"APP_DEBUG": "true",
Expand Down
1 change: 1 addition & 0 deletions src/larasets/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ set -e

### Install this feature
install-feature
install-bin

0 comments on commit f2f1ccc

Please sign in to comment.