feat(install): update install script to sync bin commands and fix script permissions

This commit is contained in:
Janik von Rotz committed 2026-02-18 16:38:57 +01:00
1 parent 0e0a4022d7
commit 0a375a90dc
3 files changed
+101 -47

No files matched your search

Executable → Regular
+53 -45
View File
@@ -4,51 +4,59 @@ set -e
repository=https://taskfile.build
scripts=(
activate-venv
backup-dotenv-files
build-image
clean-git-folder
commit-git-folder
commit-with-llm
copy-dotenv
create-dotenv
create-symlink
create-symlink-files
edit-dotenv
ensure-directory
get-pass-from-keepass
init-dotenv-dir
list-dotenv
load-dotenv-from-keepass
load-dotenv-from-pass
load-dotenv
load-kubeconfig-from-keepass
load-kubeconfig-from-pass
log-error
login-docker
log-success
log-warning
ls-git-folder
open-url-with-delay
open-with-os
push-git-folder
remove-dotenv
remove-venv
rename-dotenv
reset-git-folder
restore-dotenv-files
save-dotenv-to-keepass
save-dotenv-to-pass
save-kubeconfig-to-keepass
save-kubeconfig-to-pass
save-pass-to-keepass
show-dotenv-setup
show-dotenv
stage-git-folder
status-git-folder
template-dotenv
update-submodule
update-with-llm
activate-venv
backup-env-files
build-image
clean-git-folder
commit-git-folder
commit-with-llm
copy-dotenv
copy-to-clipboard
create-dotenv
create-prompt
create-symlink
create-symlink-files
edit-dotenv
ensure-directory
get-pass-from-keepass
init-dotenv-dir
init-project
list-dotenv
list-prompts
load-dotenv
load-dotenv-from-keepass
load-dotenv-from-pass
load-kubeconfig-from-keepass
load-kubeconfig-from-pass
log-error
login-docker
log-success
log-warning
ls-git-folder
open-url-with-delay
open-with-os
pull-all-repos
push-git-folder
remove-dotenv
remove-venv
rename-dotenv
reset-git-folder
restore-dotenv-files
save-dotenv-to-keepass
save-dotenv-to-pass
save-kubeconfig-to-keepass
save-kubeconfig-to-pass
save-pass-to-keepass
show-dotenv
show-dotenv-setup
stage-git-folder
status-all-repos
status-git-folder
template-dotenv
unshallow-git-folder
update-changelog-with-llm
update-submodule
update-with-llm
)
install_dir='/usr/local/bin'
+48 -2
View File
@@ -263,7 +263,7 @@ update-template() {
# Extract all rows from library.md that match the pattern rows+=("...")
local -a new_rows
while IFS= read -r line; do
if [[ $line =~ rows\+=\(\"(.*)\"\) ]]; then
if [[ $line =~ rows\+=\("(.*)"\) ]]; then
new_rows+=("${BASH_REMATCH[1]}")
fi
done < library.md
@@ -296,7 +296,7 @@ update-template() {
# Skip existing rows between header and for-loop
if $in_rows_section && $found_header; then
if [[ $line =~ rows\+=\(\"(.*)\"\) ]]; then
if [[ $line =~ rows\+=\("(.*)"\) ]]; then
continue
fi
fi
@@ -308,6 +308,52 @@ update-template() {
mv "$temp_file" task.template
echo "task.template updated successfully"
# Update the install script with bin commands
echo "Updating install script with bin commands"
# Generate the list of bin scripts excluding install
local scripts_list
scripts_list=$(ls -1 bin | sed '/install/d' | sort)
# Create a temporary file for install script
local install_temp_file
install_temp_file=$(mktemp)
# Read the install file and update the scripts section
local in_scripts_section=false
while IFS= read -r line || [[ -n "$line" ]]; do
# Check if we're at the scripts=(
if [[ $line == "scripts=(" ]]; then
echo "$line" >> "$install_temp_file"
in_scripts_section=true
# Add all the scripts from bin directory
while IFS= read -r script; do
echo " $script" >> "$install_temp_file"
done <<< "$scripts_list"
continue
fi
# Check if we're at the closing )
if [[ $line == ")" ]] && $in_scripts_section; then
in_scripts_section=false
fi
# Skip existing scripts between scripts=( and )
if $in_scripts_section; then
if [[ $line != "scripts=(" ]] && [[ $line != ")" ]]; then
continue
fi
fi
echo "$line" >> "$install_temp_file"
done < install
# Replace install with the updated content
mv "$install_temp_file" install
echo "install script updated successfully"
}
if [[ "$1" == *","* ]]; then
Executable → Regular
View File
File mode changed.