Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
mu-map
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tamino Huxohl
mu-map
Commits
bcdec527
Commit
bcdec527
authored
2 years ago
by
Tamino Huxohl
Browse files
Options
Downloads
Patches
Plain Diff
add uility script to uninstall STIR
parent
ab8c85ff
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libs/uninstall_stir.sh
+61
-0
61 additions, 0 deletions
libs/uninstall_stir.sh
with
61 additions
and
0 deletions
libs/uninstall_stir.sh
0 → 100755
+
61
−
0
View file @
bcdec527
#!/bin/bash
"""
This is a utility script which uninstalls STIR by removing all created binaries
and library files.
__There is NO GUARANTEE that this will work.
Binaries and libraries are automatically detected based on the output of
`
make
install
`
. However, this only works if
`
make
install
`
was run successfully
before.
"""
DIR_BUILD_STIR
=
"STIR_build"
if
[
-z
${
VIRTUAL_ENV
}
]
;
then
INSTALL_PREFIX
=
"/usr/local"
else
INSTALL_PREFIX
=
${
VIRTUAL_ENV
}
fi
DIR_STIR_BIN
=
"
${
INSTALL_PREFIX
}
/bin"
DIR_STIR_LIB
=
"
${
INSTALL_PREFIX
}
/lib"
FILE_MAKE_OUT
=
"make_output.txt"
cd
${
DIR_BUILD_STIR
}
&&
\
make
install
>
${
FILE_MAKE_OUT
}
&&
\
cd
-
STIR_BINS
=
$(
cat
${
DIR_BUILD_STIR
}
/
${
FILE_MAKE_OUT
}
|
grep
"bin/"
|
sed
"s/bin
\/
/%/g"
|
cut
-d
"%"
-f
2
)
STIR_LIBS
=
$(
cat
${
DIR_BUILD_STIR
}
/
${
FILE_MAKE_OUT
}
|
grep
"lib/"
|
sed
"s/lib
\/
/%/g"
|
cut
-d
"%"
-f
2
)
echo
"================================================"
echo
"Remove STIR binaries:"
for
STIR_BIN
in
${
STIR_BINS
}
;
do
echo
"sudo rm
${
DIR_STIR_BIN
}
/
${
STIR_BIN
}
"
done
read
-p
"Are you sure? (y/n)"
-n
1
-r
echo
if
[[
${
REPLY
}
==
"y"
]]
;
then
echo
"Remove STIR binaries!"
for
STIR_BIN
in
${
STIR_BINS
}
;
do
sudo rm
${
DIR_STIR_BIN
}
/
${
STIR_BIN
}
done
fi
echo
echo
"Remove STIR libraries:"
for
STIR_LIB
in
${
STIR_LIBS
}
;
do
echo
"sudo rm
${
DIR_STIR_LIB
}
/
${
STIR_LIB
}
"
done
read
-p
"Are you sure? (y/n)"
-n
1
-r
echo
if
[[
${
REPLY
}
==
"y"
]]
;
then
echo
"Remove STIR libraries!"
for
STIR_LIB
in
${
STIR_LIBS
}
;
do
sudo rm
${
DIR_STIR_LIB
}
/
${
STIR_LIB
}
done
fi
rm
${
DIR_BUILD_STIR
}
/
${
FILE_MAKE_OUT
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment