-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from VladBrok/linux-support
Linux support
- Loading branch information
Showing
10 changed files
with
127 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
dotnet build src/navigatio --no-restore && source scripts/setup.sh src/navigatio/bin/debug/net6.0/ | ||
#!/usr/bin/env bash | ||
|
||
dotnet build src/navigatio --no-restore && scripts/setup.sh src/navigatio/bin/debug/net6.0/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,16 @@ | ||
#!/usr/bin/env | ||
#!/usr/bin/env bash | ||
|
||
PROJECT_DIR=src/navigatio | ||
BASE_DIR=${PROJECT_DIR}/bin/Release | ||
|
||
rm -rf ${BASE_DIR}/x86 && \ | ||
dotnet publish $PROJECT_DIR -c Release -o ${BASE_DIR}/x86 -a x86 --sc true && \ | ||
powershell Compress-Archive -Path "'${BASE_DIR}/x86/*'" -DestinationPath 'windows-x86.zip' -Force | ||
function release_for_os() { | ||
rm -rf ${BASE_DIR}/$1 && \ | ||
|
||
rm -rf ${BASE_DIR}/x64 && \ | ||
dotnet publish $PROJECT_DIR -c Release -o ${BASE_DIR}/x64 -a x64 --sc true && \ | ||
powershell Compress-Archive -Path "'${BASE_DIR}/x64/*'" -DestinationPath 'windows-x64.zip' -Force | ||
dotnet publish $PROJECT_DIR --configuration Release --output ${BASE_DIR}/$1 --runtime $1 --self-contained true && \ | ||
|
||
powershell Compress-Archive -Path "'${BASE_DIR}/$1/*'" -DestinationPath "$1.zip" -Force | ||
} | ||
|
||
release_for_os win-x86 | ||
release_for_os win-x64 | ||
release_for_os linux-x64 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,45 @@ | ||
#!/usr/bin/env | ||
#!/usr/bin/env bash | ||
|
||
ROOT=/usr/local/bin/navigatio | ||
EXE_PATH=$1 | ||
export ROOT=/usr/local/bin/navigatio | ||
export EXE_PATH=$1 | ||
|
||
mkdir -p $ROOT | ||
cp -r ${EXE_PATH}. $ROOT | ||
chmod +x ${ROOT}/nav.sh | ||
function create_dir() { | ||
mkdir -p $ROOT | ||
cp -r ${EXE_PATH}. $ROOT | ||
} | ||
|
||
echo "" >> ~/.bashrc | ||
echo "alias nav='source ${ROOT}/nav.sh ${ROOT}/'" >> ~/.bashrc | ||
source ~/.bashrc | ||
function sudo_create_dir() { | ||
sudo -E bash -c "$(declare -f create_dir); create_dir" | ||
} | ||
|
||
function set_permissions() { | ||
sudo touch ${ROOT}/output.sh | ||
sudo touch ${ROOT}/aliases.json | ||
sudo touch ${ROOT}/history.json | ||
|
||
sudo chmod a+x ${ROOT}/nav.sh | ||
sudo chmod a+x ${ROOT}/Navigatio | ||
sudo chmod a+wx ${ROOT}/output.sh | ||
sudo chmod a+w ${ROOT}/settings.json | ||
sudo chmod a+w ${ROOT}/aliases.json | ||
sudo chmod a+w ${ROOT}/history.json | ||
} | ||
|
||
function create_alias() { | ||
echo "" >> ~/.bashrc | ||
echo "alias nav='source ${ROOT}/nav.sh ${ROOT} ${ROOT}/output.sh'" >> ~/.bashrc | ||
} | ||
|
||
unamestr=$(uname) | ||
if [[ "$unamestr" == 'Linux' ]] | ||
then | ||
sudo_create_dir | ||
set_permissions | ||
else | ||
create_dir | ||
fi | ||
|
||
create_alias | ||
|
||
unset ROOT | ||
unset EXE_PATH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/usr/bin/env | ||
#!/usr/bin/env bash | ||
|
||
rm -rf /usr/local/bin/navigatio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
{ | ||
"CommandHistoryLimit": 100, | ||
"FavoriteEditor": "notepad" | ||
"FavoriteEditor": null | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters