Commit a573f239 authored by PoroCYon's avatar PoroCYon
Browse files

add support for non-straced packages (eg. those that create packages handled...

add support for non-straced packages (eg. those that create packages handled by the system package manager)
parent 0dfbf837
......@@ -52,24 +52,24 @@ print_help() {
#print_version
(>&2 cat <<EOF
sspt - manage upstream repositories
Usage: $0 [-h|-?|--help]
Usage: sspt [-h|-?|--help]
Print this help text and exit.
- $0 [-V|--version]
- sspt [-V|--version]
Print the version of sspt and exit.
- $0 [-c|--config] <file>
- sspt [-c|--config] <file>
Use the specified file as configuration, instead of
\$XDG_CONFIG_HOME/sspt.conf
- $0 --mk-default-config
- sspt --mk-default-config
Create a default config file. The file is placed in
\$XDG_CONFIG_HOME/sspt.conf , unless --config was specified.
- $0 [-L|--list|--list-subcommands]
- sspt [-L|--list|--list-subcommands]
List all available subcommands. Subcommands work like they
do in git, one can define them by creating a sspt-<subcommand>
and placing it in \$SSPT_SUB_DIR (defined in the sspt config
file). Note that calling the subcommand files directly is a
bad idea as the main ssbt script sets up the environment.
- $0 <subcommand> <options...>
Execute a subcommand. Use \`$0 <subcommand> --help\' for more
- sspt <subcommand> <options...>
Execute a subcommand. Use \`sspt <subcommand> --help\' for more
information about a particular subcommand.
EOF
)
......
......@@ -157,6 +157,7 @@ autogen_buildsys() {
if [ -f "PKGBUILD" ]; then
cat >> "$SSPT_FILE" <<EOF
export SSPT_TRACK_FILES="no"
sspt_config() {
makepkg -o
}
......@@ -175,6 +176,7 @@ sspt_clean_config() {
EOF
elif [ -f "APKBUILD" ]; then
cat >> "$SSPT_FILE" <<EOF
export SSPT_TRACK_FILES="no"
sspt_config() {
abuild prepare
}
......
......@@ -91,7 +91,18 @@ main() {
exit 1
fi
run_strace "$@"
(. "$SSPT_SRC_DIR/$(escape_string "$1")/.sspt"; \
[ "$SSPT_TRACK_FILES" = "no" ] && exit 1 || exit 0)
if [ $? -eq 0 ]; then
run_strace "$@"
else
echo "NOTE: installing package '$1' whose installed files" \
" will not be tracked by sspt. This will make \`sspt" \
" uninstall\` meaningless for this package."
exec_subcommand pkgcmd install "$1"
OUTFILE="$(temp_filename)"
touch "$OUTFILE"
fi
exec_subcommand bin-db reg "$1" "$OUTFILE"
rm "$OUTFILE"
......
......@@ -17,7 +17,6 @@ remove_empty_dir_rec() {
return
fi
echo "trying $1"
if ! file_exists_glob "$1/"*; then
echo "removing $1"
rm -rf "$1"
......
* (optionally in .sspt) no strace
* aliases (sspt rm foo)
* bulk operations (pull pkg0 pkg1 pkg2 ...)
* install with '/' in package -> pull etc.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment