Streamline aliae
installation
This commit is contained in:
parent
a761514d2a
commit
5e5bb3e5df
9 changed files with 114 additions and 2 deletions
scripts/Common/Scripts
23
scripts/Common/Scripts/profile-base.fish
Normal file
23
scripts/Common/Scripts/profile-base.fish
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/bin/env fish
|
||||
begin
|
||||
function processContent -a content
|
||||
echo "$content"
|
||||
end
|
||||
|
||||
function addProfileStatement -a name title shellBin extension profileRoot content
|
||||
set -l file (mktemp)
|
||||
|
||||
if [ -z "$content" ]
|
||||
read -l content
|
||||
end
|
||||
|
||||
begin
|
||||
printf %s\n \
|
||||
"#!$shellBin" \
|
||||
"# $title" \
|
||||
(processContent "$content")
|
||||
end > "$file"
|
||||
|
||||
sudo install -Dm755 "$file" "$profileRoot/$name.$extension"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue